From ac11d19017f8515bbde4566edcaa4ac260821c7d Mon Sep 17 00:00:00 2001 From: Thomas5555 Date: Thu, 14 Jul 2022 15:54:14 +0000 Subject: [PATCH] fix error sensor --- custom_components/husqvarna_automower/binary_sensor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/husqvarna_automower/binary_sensor.py b/custom_components/husqvarna_automower/binary_sensor.py index 246b4877..2b2e32b5 100644 --- a/custom_components/husqvarna_automower/binary_sensor.py +++ b/custom_components/husqvarna_automower/binary_sensor.py @@ -110,5 +110,6 @@ def extra_state_attributes(self) -> str: """Return the specific state attributes of this mower.""" mower_attributes = AutomowerEntity.get_mower_attributes(self) if self.is_on: - return ERRORCODES.get(mower_attributes["mower"]["errorCode"]) + error = ERRORCODES.get(mower_attributes["mower"]["errorCode"]) + return {"error": error} return None