Use DeviceEntryType in Metoffice (#60252)

pull/60315/head
avee87 2021-11-25 00:24:27 +00:00 committed by GitHub
parent d3c020325b
commit 0920e74aa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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}",