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

pull/113582/head^2
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
1 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@ import voluptuous as vol
from homeassistant import util
from homeassistant.backports.functools import cached_property
from homeassistant.components import zone
from homeassistant.components.zone import ENTITY_ID_HOME
from homeassistant.config import (
async_log_schema_error,
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:
kwargs["gps"] = [
zone_home.attributes[ATTR_LATITUDE],