Use DeviceInfo Class L-M (#58312)

This commit is contained in:
Robert Hillis 2021-10-25 17:26:40 -04:00 committed by GitHub
parent 6341dd4883
commit f2a5c4602e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 197 additions and 197 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.entity import DeviceInfo
from .const import DOMAIN
@ -42,12 +43,12 @@ class MuteStatus(update_coordinator.CoordinatorEntity, BinarySensorEntity):
return self.coordinator.data[self._sensor_type]
@property
def device_info(self):
def device_info(self) -> DeviceInfo:
"""Return the device info of the sensor."""
return {
"identifiers": {(DOMAIN, self.coordinator.data["user-id"])},
"name": "mutesync",
"manufacturer": "mütesync",
"model": "mutesync app",
"entry_type": "service",
}
return DeviceInfo(
entry_type="service",
identifiers={(DOMAIN, self.coordinator.data["user-id"])},
manufacturer="mütesync",
model="mutesync app",
name="mutesync",
)