mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +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
|
||||
def run_stats(self):
|
||||
"""Return the run stats."""
|
||||
return self.vacuum_state.get("bbrun")
|
||||
return self.vacuum_state.get("bbrun", {})
|
||||
|
||||
@property
|
||||
def mission_stats(self):
|
||||
"""Return the mission stats."""
|
||||
return self.vacuum_state.get("bbmssn")
|
||||
return self.vacuum_state.get("bbmssn", {})
|
||||
|
||||
@property
|
||||
def battery_stats(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user