Use DeviceInfo Class F-G (#58255)

This commit is contained in:
Robert Hillis 2021-10-23 06:01:21 -04:00 committed by GitHub
parent 12c067970a
commit 63646a19cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 207 additions and 214 deletions

View file

@ -33,14 +33,14 @@ class FloEntity(Entity):
@property
def device_info(self) -> DeviceInfo:
"""Return a device description for device registry."""
return {
"identifiers": {(FLO_DOMAIN, self._device.id)},
"connections": {(CONNECTION_NETWORK_MAC, self._device.mac_address)},
"manufacturer": self._device.manufacturer,
"model": self._device.model,
"name": self._device.device_name,
"sw_version": self._device.firmware_version,
}
return DeviceInfo(
connections={(CONNECTION_NETWORK_MAC, self._device.mac_address)},
identifiers={(FLO_DOMAIN, self._device.id)},
manufacturer=self._device.manufacturer,
model=self._device.model,
name=self._device.device_name,
sw_version=self._device.firmware_version,
)
@property
def available(self) -> bool: