Skip to content

Commit

Permalink
Remove deprecated code #502
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Jul 14, 2024
1 parent 96cfa60 commit b70341a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 84 deletions.
11 changes: 5 additions & 6 deletions custom_components/yandex_station/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
TrackTemplateResult,
)
from homeassistant.helpers.template import Template
from homeassistant.helpers.typing import HomeAssistantType
from yarl import URL

from .const import CONF_MEDIA_PLAYERS, DATA_CONFIG, DOMAIN
Expand Down Expand Up @@ -52,7 +51,7 @@ class YandexDebug(logging.Handler, HomeAssistantView):

text = ""

def __init__(self, hass: HomeAssistantType, logger: Logger):
def __init__(self, hass: HomeAssistant, logger: Logger):
super().__init__()

logger.addHandler(self)
Expand Down Expand Up @@ -119,7 +118,7 @@ def find_station(devices, name: str = None):
return None


async def error(hass: HomeAssistantType, text: str):
async def error(hass: HomeAssistant, text: str):
_LOGGER.error(text)
hass.components.persistent_notification.async_create(
text, title="YandexStation ERROR"
Expand All @@ -137,7 +136,7 @@ def clean_v1(hass_dir):
os.remove(path)


async def has_custom_icons(hass: HomeAssistantType):
async def has_custom_icons(hass: HomeAssistant):
# GUI off mode
if "lovelace" not in hass.data:
return False
Expand Down Expand Up @@ -229,7 +228,7 @@ async def get_media_payload(text: str, session):
return None


async def get_zeroconf_singleton(hass: HomeAssistantType):
async def get_zeroconf_singleton(hass: HomeAssistant):
try:
# Home Assistant 0.110.0 and above
from homeassistant.components.zeroconf import async_get_instance
Expand Down Expand Up @@ -278,7 +277,7 @@ async def get_tts_message(session: ClientSession, url: str):


# noinspection PyProtectedMember
def fix_recognition_lang(hass: HomeAssistantType, folder: str, lng: str):
def fix_recognition_lang(hass: HomeAssistant, folder: str, lng: str):
path = frontend._frontend_root(None).joinpath(folder)
for child in path.iterdir():
# find all chunc.xxxx.js files
Expand Down
78 changes: 0 additions & 78 deletions custom_components/yandex_station/intent.py

This file was deleted.

0 comments on commit b70341a

Please sign in to comment.