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

@ -1,6 +1,7 @@
"""mütesync binary sensor entities."""
from homeassistant.components.binary_sensor import BinarySensorEntity
from homeassistant.helpers import update_coordinator
from homeassistant.helpers.device_registry import DeviceEntryType
from homeassistant.helpers.entity import DeviceInfo
from .const import DOMAIN
@ -46,7 +47,7 @@ class MuteStatus(update_coordinator.CoordinatorEntity, BinarySensorEntity):
def device_info(self) -> DeviceInfo:
"""Return the device info of the sensor."""
return DeviceInfo(
entry_type="service",
entry_type=DeviceEntryType.SERVICE,
identifiers={(DOMAIN, self.coordinator.data["user-id"])},
manufacturer="mütesync",
model="mutesync app",