From 6e9c03bafcbe1ba72c6b25a6ca642a0e64f2b930 Mon Sep 17 00:00:00 2001 From: vlebourl Date: Fri, 12 Jun 2020 09:09:43 +0200 Subject: [PATCH] Tahoma seems to not send all possible keys, depending on the devices states, we should add the unknown key instead of raising an error. --- custom_components/tahoma/tahoma_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tahoma/tahoma_api.py b/custom_components/tahoma/tahoma_api.py index 183d9207c..955b520aa 100644 --- a/custom_components/tahoma/tahoma_api.py +++ b/custom_components/tahoma/tahoma_api.py @@ -650,7 +650,7 @@ def active_states(self): def set_active_state(self, name, value): """Set active state.""" if name not in self.__active_states.keys(): - raise ValueError("Can not set unknown state '" + name + "'") + self.__active_states[name] = value if (isinstance(self.__active_states[name], int) and isinstance(value, str)):