Skip to content

Commit

Permalink
Remove usage of deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dext0r committed Apr 27, 2024
1 parent 992ad17 commit 1440bb6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion custom_components/yandex_smart_home/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The Yandex Smart Home component."""

from __future__ import annotations

import logging
Expand All @@ -10,6 +11,7 @@
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.entityfilter import BASE_FILTER_SCHEMA, FILTER_SCHEMA, EntityFilter
from homeassistant.helpers.reload import async_integration_yaml_config
from homeassistant.helpers.service import async_register_admin_service
import voluptuous as vol

from . import config_validation as ycv, const
Expand Down Expand Up @@ -176,7 +178,7 @@ def __init__(self, hass: HomeAssistant, yaml_config: ConfigType):
self._yaml_config = yaml_config
self._entry_datas: dict[str, ConfigEntryData] = {}

hass.helpers.service.async_register_admin_service(DOMAIN, SERVICE_RELOAD, self._handle_yaml_config_reload)
async_register_admin_service(hass, DOMAIN, SERVICE_RELOAD, self._handle_yaml_config_reload)

async def _handle_yaml_config_reload(self, _: Any) -> None:
"""Handle yaml configuration reloading."""
Expand Down
3 changes: 2 additions & 1 deletion custom_components/yandex_smart_home/capability_range.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""Implement the Yandex Smart Home range capabilities."""

from abc import ABC, abstractmethod
from functools import cached_property
import logging
from typing import Any, Protocol

from homeassistant.backports.functools import cached_property
from homeassistant.components import climate, cover, fan, humidifier, light, media_player, water_heater
from homeassistant.const import (
ATTR_DEVICE_CLASS,
Expand Down

0 comments on commit 1440bb6

Please sign in to comment.