Use shorthand attributes in Neato (#99605)
Co-authored-by: Robert Resch <robert@resch.dev>
This commit is contained in:
parent
5afba6327c
commit
2c45d43e7b
5 changed files with 27 additions and 75 deletions
|
@ -17,11 +17,7 @@ class NeatoEntity(Entity):
|
|||
def __init__(self, robot: Robot) -> None:
|
||||
"""Initialize Neato entity."""
|
||||
self.robot = robot
|
||||
|
||||
@property
|
||||
def device_info(self) -> DeviceInfo:
|
||||
"""Return device info."""
|
||||
return DeviceInfo(
|
||||
self._attr_device_info: DeviceInfo = DeviceInfo(
|
||||
identifiers={(NEATO_DOMAIN, self.robot.serial)},
|
||||
name=self.robot.name,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue