Fix botvac when no map exists (#21877)

pull/21982/head
Daniel Shokouhi 2019-03-09 14:06:35 -08:00 committed by Paulus Schoutsen
parent 1b4905ae5a
commit 00d01865cf
1 changed files with 5 additions and 3 deletions

View File

@ -187,10 +187,12 @@ class NeatoConnectedVacuum(StateVacuumDevice):
if self._robot_has_map:
if self._state['availableServices']['maps'] != "basic-1":
robot_map_id = self._robot_maps[self._robot_serial][0]['id']
if self._robot_maps[self._robot_serial]:
robot_map_id = (
self._robot_maps[self._robot_serial][0]['id'])
self._robot_boundaries = self.robot.get_map_boundaries(
robot_map_id).json()
self._robot_boundaries = self.robot.get_map_boundaries(
robot_map_id).json()
@property
def name(self):