Use DeviceEntryType in non-typechecked code too (#58646)
This commit is contained in:
parent
ca20fc857f
commit
39691faccc
24 changed files with 50 additions and 31 deletions
|
@ -12,6 +12,7 @@ from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE
|
|||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers import debounce
|
||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
from homeassistant.helpers.device_registry import DeviceEntryType
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
from homeassistant.helpers.event import async_track_point_in_utc_time
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
||||
|
@ -172,7 +173,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
def device_info(latitude, longitude) -> DeviceInfo:
|
||||
"""Return device registry information."""
|
||||
return DeviceInfo(
|
||||
entry_type="service",
|
||||
entry_type=DeviceEntryType.SERVICE,
|
||||
identifiers={(DOMAIN, base_unique_id(latitude, longitude))},
|
||||
manufacturer="National Weather Service",
|
||||
name=f"NWS: {latitude}, {longitude}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue