mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +00:00
Handle missing fields from Roomba (#107893)
Add default values to mission_stats and run_stats
This commit is contained in:
parent
d0e9e54f26
commit
86e608d04f
@ -105,12 +105,12 @@ class IRobotEntity(Entity):
|
|||||||
@property
|
@property
|
||||||
def run_stats(self):
|
def run_stats(self):
|
||||||
"""Return the run stats."""
|
"""Return the run stats."""
|
||||||
return self.vacuum_state.get("bbrun")
|
return self.vacuum_state.get("bbrun", {})
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def mission_stats(self):
|
def mission_stats(self):
|
||||||
"""Return the mission stats."""
|
"""Return the mission stats."""
|
||||||
return self.vacuum_state.get("bbmssn")
|
return self.vacuum_state.get("bbmssn", {})
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def battery_stats(self):
|
def battery_stats(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user