Skip to content

Commit

Permalink
show battery level also when vacuum has no map support (#23947)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter authored and Danielhiversen committed May 18, 2019
1 parent c483e44 commit 05146ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/neato/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ def update(self):
self._clean_state = STATE_ERROR
self._status_state = ERRORS.get(self._state['error'])

self._battery_level = self._state['details']['charge']

if not self._mapdata.get(self._robot_serial, {}).get('maps', []):
return
self.clean_time_start = (
Expand All @@ -182,8 +184,6 @@ def update(self):
self.clean_battery_end = (
self._mapdata[self._robot_serial]['maps'][0]['run_charge_at_end'])

self._battery_level = self._state['details']['charge']

if self._robot_has_map:
if self._state['availableServices']['maps'] != "basic-1":
if self._robot_maps[self._robot_serial]:
Expand Down

0 comments on commit 05146ba

Please sign in to comment.