mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 14:57:09 +00:00
show battery level also when vacuum has no map support (#23947)
This commit is contained in:
parent
c483e4479e
commit
05146badf1
@ -159,6 +159,8 @@ class NeatoConnectedVacuum(StateVacuumDevice):
|
|||||||
self._clean_state = STATE_ERROR
|
self._clean_state = STATE_ERROR
|
||||||
self._status_state = ERRORS.get(self._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', []):
|
if not self._mapdata.get(self._robot_serial, {}).get('maps', []):
|
||||||
return
|
return
|
||||||
self.clean_time_start = (
|
self.clean_time_start = (
|
||||||
@ -182,8 +184,6 @@ class NeatoConnectedVacuum(StateVacuumDevice):
|
|||||||
self.clean_battery_end = (
|
self.clean_battery_end = (
|
||||||
self._mapdata[self._robot_serial]['maps'][0]['run_charge_at_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._robot_has_map:
|
||||||
if self._state['availableServices']['maps'] != "basic-1":
|
if self._state['availableServices']['maps'] != "basic-1":
|
||||||
if self._robot_maps[self._robot_serial]:
|
if self._robot_maps[self._robot_serial]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user