Remove `@bind_hass` from async_active_zone and make callback function (#111488)

pull/111497/head
Jan-Philipp Benecke 2024-02-26 17:57:17 +01:00 committed by GitHub
parent 67e356904b
commit f85a8c5041
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 3 deletions

View File

@ -38,7 +38,6 @@ from homeassistant.helpers import (
storage,
)
from homeassistant.helpers.typing import ConfigType, EventType
from homeassistant.loader import bind_hass
from homeassistant.util.location import distance
from .const import ATTR_PASSIVE, ATTR_RADIUS, CONF_PASSIVE, DOMAIN, HOME_ZONE
@ -63,7 +62,6 @@ CREATE_FIELDS = {
vol.Optional(CONF_ICON): cv.icon,
}
UPDATE_FIELDS = {
vol.Optional(CONF_NAME): cv.string,
vol.Optional(CONF_LATITUDE): cv.latitude,
@ -101,7 +99,7 @@ ENTITY_ID_SORTER = attrgetter("entity_id")
ZONE_ENTITY_IDS = "zone_entity_ids"
@bind_hass
@callback
def async_active_zone(
hass: HomeAssistant, latitude: float, longitude: float, radius: int = 0
) -> State | None: