Browse Source

BugFix: RX current setpoint

master
Dirk Alders 1 year ago
parent
commit
4fb01e2f93
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      z_server/devices/__init__.py

+ 5
- 4
z_server/devices/__init__.py View File

90
 
90
 
91
     def __rx__(self, client, userdata, message):
91
     def __rx__(self, client, userdata, message):
92
         payload = json.loads(message.payload)
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
 class silvercrest_powerplug(base):
100
 class silvercrest_powerplug(base):

Loading…
Cancel
Save