Parcourir la source

BugFix: RX current setpoint

master
Dirk Alders il y a 1 an
Parent
révision
4fb01e2f93
1 fichiers modifiés avec 5 ajouts et 4 suppressions
  1. 5
    4
      z_server/devices/__init__.py

+ 5
- 4
z_server/devices/__init__.py Voir le fichier

@@ -90,10 +90,11 @@ class brennenstuhl_heatingvalve(base):
90 90
 
91 91
     def __rx__(self, client, userdata, message):
92 92
         payload = json.loads(message.payload)
93
-        if message.topic == self.topic + '/set':
94
-            self.target("current_heating_setpoint", payload["current_heating_setpoint"])
95
-        if message.topic == self.topic:
96
-            self.state("current_heating_setpoint", payload["current_heating_setpoint"])
93
+        if "current_heating_setpoint" in payload:
94
+            if message.topic == self.topic + '/set':
95
+                self.target("current_heating_setpoint", payload["current_heating_setpoint"])
96
+            if message.topic == self.topic:
97
+                self.state("current_heating_setpoint", payload["current_heating_setpoint"])
97 98
 
98 99
 
99 100
 class silvercrest_powerplug(base):

Chargement…
Annuler
Enregistrer