mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
Fix for Neato D3 Connected state obtaining (#8817)
This commit is contained in:
parent
55c84eaee3
commit
b035577cf5
@ -105,7 +105,7 @@ class NeatoConnectedSensor(Entity):
|
|||||||
self._status_state = ERRORS.get(self._state['error'])
|
self._status_state = ERRORS.get(self._state['error'])
|
||||||
if self.type == SENSOR_TYPE_BATTERY:
|
if self.type == SENSOR_TYPE_BATTERY:
|
||||||
self._battery_state = self._state['details']['charge']
|
self._battery_state = self._state['details']['charge']
|
||||||
if self._mapdata is None:
|
if not self._mapdata.get(self.robot.serial, {}).get('maps', []):
|
||||||
return
|
return
|
||||||
self.clean_time_start = (
|
self.clean_time_start = (
|
||||||
(self._mapdata[self.robot.serial]['maps'][0]['start_at']
|
(self._mapdata[self.robot.serial]['maps'][0]['start_at']
|
||||||
|
@ -72,7 +72,7 @@ class NeatoConnectedSwitch(ToggleEntity):
|
|||||||
self._clean_state = STATE_ON
|
self._clean_state = STATE_ON
|
||||||
else:
|
else:
|
||||||
self._clean_state = STATE_OFF
|
self._clean_state = STATE_OFF
|
||||||
_LOGGER.debug("Schedule state: %s", self._schedule_state)
|
_LOGGER.debug("Clean state: %s", self._clean_state)
|
||||||
if self.type == SWITCH_TYPE_SCHEDULE:
|
if self.type == SWITCH_TYPE_SCHEDULE:
|
||||||
_LOGGER.debug("State: %s", self._state)
|
_LOGGER.debug("State: %s", self._state)
|
||||||
if self.robot.schedule_enabled:
|
if self.robot.schedule_enabled:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user