Use shorthand attributes in Laundrify (#99586)
This commit is contained in:
parent
fa0b61e96a
commit
051e9e7498
1 changed files with 6 additions and 9 deletions
|
@ -51,17 +51,14 @@ class LaundrifyPowerPlug(
|
|||
"""Pass coordinator to CoordinatorEntity."""
|
||||
super().__init__(coordinator)
|
||||
self._device = device
|
||||
self._attr_unique_id = device["_id"]
|
||||
|
||||
@property
|
||||
def device_info(self) -> DeviceInfo:
|
||||
"""Configure the Device of this Entity."""
|
||||
return DeviceInfo(
|
||||
identifiers={(DOMAIN, self._device["_id"])},
|
||||
name=self._device["name"],
|
||||
unique_id = device["_id"]
|
||||
self._attr_unique_id = unique_id
|
||||
self._attr_device_info = DeviceInfo(
|
||||
identifiers={(DOMAIN, unique_id)},
|
||||
name=device["name"],
|
||||
manufacturer=MANUFACTURER,
|
||||
model=MODEL,
|
||||
sw_version=self._device["firmwareVersion"],
|
||||
sw_version=device["firmwareVersion"],
|
||||
)
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Reference in a new issue