mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-21 22:48:16 +01:00
Set power to Zero if the actor is switched off.
Set power to Zero if the actor is switched off.
This commit is contained in:
parent
55db17e4fe
commit
a4f1de3953
1 changed files with 2 additions and 2 deletions
|
@ -39,7 +39,7 @@ class MQTTActor(CBPiActor):
|
||||||
async def off(self):
|
async def off(self):
|
||||||
self.state = False
|
self.state = False
|
||||||
await self.cbpi.satellite.publish(self.topic, json.dumps(
|
await self.cbpi.satellite.publish(self.topic, json.dumps(
|
||||||
{"state": "off", "power": self.power}), True)
|
{"state": "off", "power": 0}), True)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
async def run(self):
|
async def run(self):
|
||||||
|
@ -56,4 +56,4 @@ class MQTTActor(CBPiActor):
|
||||||
else:
|
else:
|
||||||
await self.off()
|
await self.off()
|
||||||
await self.cbpi.actor.actor_update(self.id,power)
|
await self.cbpi.actor.actor_update(self.id,power)
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue