Remove deprecated hass.components from legacy device tracker platform (#113612)

This commit is contained in:
Jan-Philipp Benecke 2024-03-16 22:19:29 +01:00 committed by GitHub
parent 0b9c9aff62
commit c58bba55bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,6 +15,7 @@ import voluptuous as vol
from homeassistant import util from homeassistant import util
from homeassistant.backports.functools import cached_property from homeassistant.backports.functools import cached_property
from homeassistant.components import zone from homeassistant.components import zone
from homeassistant.components.zone import ENTITY_ID_HOME
from homeassistant.config import ( from homeassistant.config import (
async_log_schema_error, async_log_schema_error,
config_per_platform, config_per_platform,
@ -481,7 +482,7 @@ def async_setup_scanner_platform(
}, },
} }
zone_home = hass.states.get(hass.components.zone.ENTITY_ID_HOME) zone_home = hass.states.get(ENTITY_ID_HOME)
if zone_home is not None: if zone_home is not None:
kwargs["gps"] = [ kwargs["gps"] = [
zone_home.attributes[ATTR_LATITUDE], zone_home.attributes[ATTR_LATITUDE],