This commit is contained in:
Paulus Schoutsen 2019-07-31 12:25:30 -07:00
parent da05dfe708
commit 4de97abc3a
2676 changed files with 163166 additions and 140084 deletions

View file

@ -15,7 +15,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Neato Camera."""
dev = []
for robot in hass.data[NEATO_ROBOTS]:
if 'maps' in robot.traits:
if "maps" in robot.traits:
dev.append(NeatoCleaningMap(hass, robot))
_LOGGER.debug("Adding robots for cleaning maps %s", dev)
add_entities(dev, True)
@ -28,7 +28,7 @@ class NeatoCleaningMap(Camera):
"""Initialize Neato cleaning map."""
super().__init__()
self.robot = robot
self._robot_name = '{} {}'.format(self.robot.name, 'Cleaning Map')
self._robot_name = "{} {}".format(self.robot.name, "Cleaning Map")
self._robot_serial = self.robot.serial
self.neato = hass.data[NEATO_LOGIN]
self._image_url = None
@ -44,7 +44,7 @@ class NeatoCleaningMap(Camera):
self.neato.update_robots()
image_url = None
map_data = self.hass.data[NEATO_MAP_DATA]
image_url = map_data[self._robot_serial]['maps'][0]['url']
image_url = map_data[self._robot_serial]["maps"][0]["url"]
if image_url == self._image_url:
_LOGGER.debug("The map image_url is the same as old")
return