mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
Restore status attribute for xiaomi_vacuum (#16366)
* Added new states and exposed state/state code received from xiaomi vacuum * Restore status attribute for xiaomi_vacuum
This commit is contained in:
parent
8a2bc99f63
commit
93143384a8
@ -60,6 +60,7 @@ ATTR_ERROR = 'error'
|
|||||||
ATTR_RC_DURATION = 'duration'
|
ATTR_RC_DURATION = 'duration'
|
||||||
ATTR_RC_ROTATION = 'rotation'
|
ATTR_RC_ROTATION = 'rotation'
|
||||||
ATTR_RC_VELOCITY = 'velocity'
|
ATTR_RC_VELOCITY = 'velocity'
|
||||||
|
ATTR_STATUS = 'status'
|
||||||
|
|
||||||
SERVICE_SCHEMA_REMOTE_CONTROL = VACUUM_SERVICE_SCHEMA.extend({
|
SERVICE_SCHEMA_REMOTE_CONTROL = VACUUM_SERVICE_SCHEMA.extend({
|
||||||
vol.Optional(ATTR_RC_VELOCITY):
|
vol.Optional(ATTR_RC_VELOCITY):
|
||||||
@ -240,7 +241,8 @@ class MiroboVacuum(StateVacuumDevice):
|
|||||||
/ 3600),
|
/ 3600),
|
||||||
ATTR_SENSOR_DIRTY_LEFT: int(
|
ATTR_SENSOR_DIRTY_LEFT: int(
|
||||||
self.consumable_state.sensor_dirty_left.total_seconds()
|
self.consumable_state.sensor_dirty_left.total_seconds()
|
||||||
/ 3600)
|
/ 3600),
|
||||||
|
ATTR_STATUS: str(self.vacuum_state.state)
|
||||||
})
|
})
|
||||||
|
|
||||||
if self.vacuum_state.got_error:
|
if self.vacuum_state.got_error:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user