From 2d2abc783151ea7a876c6ffd0cbc9e5062834c9a Mon Sep 17 00:00:00 2001 From: Daniel Shokouhi Date: Sat, 9 Mar 2019 14:06:35 -0800 Subject: [PATCH] Fix botvac when no map exists (#21877) --- homeassistant/components/neato/vacuum.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/neato/vacuum.py b/homeassistant/components/neato/vacuum.py index 990c79552b4..2f2f3904947 100644 --- a/homeassistant/components/neato/vacuum.py +++ b/homeassistant/components/neato/vacuum.py @@ -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):