diff --git a/cbpi/extension/mqtt_actor/generic_mqtt_actor.py b/cbpi/extension/mqtt_actor/generic_mqtt_actor.py index c1a5b17..0d2681e 100644 --- a/cbpi/extension/mqtt_actor/generic_mqtt_actor.py +++ b/cbpi/extension/mqtt_actor/generic_mqtt_actor.py @@ -32,6 +32,6 @@ class GenericMqttActor(MQTTActor): self.state = True async def off(self): - formatted_payload = self.payload.format(switch_onoff = "off", switch_10 = 0, power = self.power) + formatted_payload = self.payload.format(switch_onoff = "off", switch_10 = 0, power = 0) await self.publish_mqtt_message(self.topic, formatted_payload) - self.state = False \ No newline at end of file + self.state = False diff --git a/cbpi/extension/mqtt_actor/mqtt_actor.py b/cbpi/extension/mqtt_actor/mqtt_actor.py index 28dd198..5c651e2 100644 --- a/cbpi/extension/mqtt_actor/mqtt_actor.py +++ b/cbpi/extension/mqtt_actor/mqtt_actor.py @@ -39,7 +39,7 @@ class MQTTActor(CBPiActor): async def off(self): self.state = False await self.cbpi.satellite.publish(self.topic, json.dumps( - {"state": "off", "power": self.power}), True) + {"state": "off", "power": 0}), True) pass async def run(self): @@ -56,4 +56,4 @@ class MQTTActor(CBPiActor): else: await self.off() await self.cbpi.actor.actor_update(self.id,power) - pass \ No newline at end of file + pass