Add unique_id for Neato (#17369)

* Add unique_id for Neato

* Only send the serial per review comments
This commit is contained in:
Daniel Shokouhi authored and Fabian Affolter committed 2018-10-13 00:33:13 +02:00
1 parent 3cf6c76f8b
commit d3672f36fb
3 files changed
+17

No files matched your search

+6
View File
@@ -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."""