Change device entry type to an StrEnum (#59940)

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Ville Skyttä 2021-11-22 19:14:15 +02:00 committed by GitHub
parent 4a5238efa5
commit 053c456199
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 167 additions and 71 deletions

View file

@ -8,6 +8,7 @@ from homeassistant.components.speedtestdotnet import SpeedTestDataCoordinator
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_ATTRIBUTION
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceEntryType
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.restore_state import RestoreEntity
@ -64,7 +65,7 @@ class SpeedtestSensor(CoordinatorEntity, RestoreEntity, SensorEntity):
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, self.coordinator.config_entry.entry_id)},
name=DEFAULT_NAME,
entry_type="service",
entry_type=DeviceEntryType.SERVICE,
configuration_url="https://www.speedtest.net/",
)