Bump roombapy to 1.6.1 (#35650)
* Bump roombapy to 1.6.1 * Improve roomba error handling
This commit is contained in:
parent
d8c7a10fd7
commit
6d0909134c
4 changed files with 8 additions and 11 deletions
|
@ -31,6 +31,7 @@ _LOGGER = logging.getLogger(__name__)
|
|||
ATTR_CLEANING_TIME = "cleaning_time"
|
||||
ATTR_CLEANED_AREA = "cleaned_area"
|
||||
ATTR_ERROR = "error"
|
||||
ATTR_ERROR_CODE = "error_code"
|
||||
ATTR_POSITION = "position"
|
||||
ATTR_SOFTWARE_VERSION = "software_version"
|
||||
|
||||
|
@ -174,11 +175,6 @@ class IRobotVacuum(IRobotEntity, StateVacuumEntity):
|
|||
# Roomba software version
|
||||
software_version = state.get("softwareVer")
|
||||
|
||||
# Error message in plain english
|
||||
error_msg = "None"
|
||||
if hasattr(self.vacuum, "error_message"):
|
||||
error_msg = self.vacuum.error_message
|
||||
|
||||
# Set properties that are to appear in the GUI
|
||||
state_attrs = {ATTR_SOFTWARE_VERSION: software_version}
|
||||
|
||||
|
@ -198,9 +194,10 @@ class IRobotVacuum(IRobotEntity, StateVacuumEntity):
|
|||
state_attrs[ATTR_CLEANING_TIME] = cleaning_time
|
||||
state_attrs[ATTR_CLEANED_AREA] = cleaned_area
|
||||
|
||||
# Skip error attr if there is none
|
||||
if error_msg and error_msg != "None":
|
||||
state_attrs[ATTR_ERROR] = error_msg
|
||||
# Error
|
||||
if self.vacuum.error_code != 0:
|
||||
state_attrs[ATTR_ERROR] = self.vacuum.error_message
|
||||
state_attrs[ATTR_ERROR_CODE] = self.vacuum.error_code
|
||||
|
||||
# Not all Roombas expose position data
|
||||
# https://github.com/koalazak/dorita980/issues/48
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "iRobot Roomba",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/roomba",
|
||||
"requirements": ["roombapy==1.5.3"],
|
||||
"requirements": ["roombapy==1.6.1"],
|
||||
"dependencies": [],
|
||||
"codeowners": ["@pschmitt", "@cyr-ius", "@shenxn"]
|
||||
}
|
||||
|
|
|
@ -1871,7 +1871,7 @@ rocketchat-API==0.6.1
|
|||
rokuecp==0.4.0
|
||||
|
||||
# homeassistant.components.roomba
|
||||
roombapy==1.5.3
|
||||
roombapy==1.6.1
|
||||
|
||||
# homeassistant.components.rova
|
||||
rova==0.1.0
|
||||
|
|
|
@ -765,7 +765,7 @@ ring_doorbell==0.6.0
|
|||
rokuecp==0.4.0
|
||||
|
||||
# homeassistant.components.roomba
|
||||
roombapy==1.5.3
|
||||
roombapy==1.6.1
|
||||
|
||||
# homeassistant.components.yamaha
|
||||
rxv==0.6.0
|
||||
|
|
Loading…
Add table
Reference in a new issue