diff --git a/z_server/devices/__init__.py b/z_server/devices/__init__.py index 5ddd436..22c6179 100644 --- a/z_server/devices/__init__.py +++ b/z_server/devices/__init__.py @@ -90,10 +90,11 @@ class brennenstuhl_heatingvalve(base): def __rx__(self, client, userdata, message): payload = json.loads(message.payload) - if message.topic == self.topic + '/set': - self.target("current_heating_setpoint", payload["current_heating_setpoint"]) - if message.topic == self.topic: - self.state("current_heating_setpoint", payload["current_heating_setpoint"]) + if "current_heating_setpoint" in payload: + if message.topic == self.topic + '/set': + self.target("current_heating_setpoint", payload["current_heating_setpoint"]) + if message.topic == self.topic: + self.state("current_heating_setpoint", payload["current_heating_setpoint"]) class silvercrest_powerplug(base):