Use DeviceEntryType in Metoffice (#60252)
parent
d3c020325b
commit
0920e74aa2
|
@ -9,6 +9,7 @@ from homeassistant.config_entries import ConfigEntry
|
|||
from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import ConfigEntryNotReady
|
||||
from homeassistant.helpers.device_registry import DeviceEntryType
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
||||
|
||||
|
@ -104,7 +105,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
def get_device_info(coordinates: str, name: str) -> DeviceInfo:
|
||||
"""Return device registry information."""
|
||||
return DeviceInfo(
|
||||
entry_type="service",
|
||||
entry_type=DeviceEntryType.SERVICE,
|
||||
identifiers={(DOMAIN, coordinates)},
|
||||
manufacturer="Met Office",
|
||||
name=f"Met Office {name}",
|
||||
|
|
Loading…
Reference in New Issue