Add unique_id for Neato (#17369)
* Add unique_id for Neato * Only send the serial per review comments
This commit is contained in:
parent
3cf6c76f8b
commit
d3672f36fb
3 changed files with 17 additions and 0 deletions
|
@ -52,6 +52,7 @@ class NeatoConnectedSwitch(ToggleEntity):
|
|||
self._state = None
|
||||
self._schedule_state = None
|
||||
self._clean_state = None
|
||||
self._robot_serial = self.robot.serial
|
||||
|
||||
def update(self):
|
||||
"""Update the states of Neato switches."""
|
||||
|
@ -83,6 +84,11 @@ class NeatoConnectedSwitch(ToggleEntity):
|
|||
"""Return True if entity is available."""
|
||||
return self._state
|
||||
|
||||
@property
|
||||
def unique_id(self):
|
||||
"""Return a unique ID."""
|
||||
return self._robot_serial
|
||||
|
||||
@property
|
||||
def is_on(self):
|
||||
"""Return true if switch is on."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue