"fix actor satellite issue"

This commit is contained in:
Manuel Fritsch 2021-02-20 12:59:23 +01:00
parent c78ab29b85
commit 79fd2b8727
3 changed files with 18 additions and 2 deletions

View file

@ -1 +1 @@
__version__ = "4.0.0.25" __version__ = "4.0.0.26"

View file

@ -16,7 +16,7 @@ class ActorController(BasicController):
if item.instance.state is False: if item.instance.state is False:
await item.instance.on() await item.instance.on()
await self.push_udpate() await self.push_udpate()
await self.cbpi.satellite.publish("cbpi/actor/on", "ACTOR ON") #await self.cbpi.satellite.publish("cbpi/actor/on", "ACTOR ON")
except Exception as e: except Exception as e:
logging.error("Faild to switch on Actor {} {}".format(id, e)) logging.error("Faild to switch on Actor {} {}".format(id, e))

View file

@ -12,6 +12,14 @@ import logging
Property.Kettle(label="Kettle")]) Property.Kettle(label="Kettle")])
class MashStep(CBPiStep): class MashStep(CBPiStep):
@action(key="Custom Step Action", parameters=[])
async def hello(self, **kwargs):
print("ACTION")
@action(key="Custom Step Action 2", parameters=[])
async def hello2(self, **kwargs):
print("ACTION2")
async def on_timer_done(self,timer): async def on_timer_done(self,timer):
self.summary = "" self.summary = ""
await self.next() await self.next()
@ -45,6 +53,14 @@ class MashStep(CBPiStep):
@parameters([Property.Number(label="Timer", description="Time in Minutes", configurable=True)]) @parameters([Property.Number(label="Timer", description="Time in Minutes", configurable=True)])
class WaitStep(CBPiStep): class WaitStep(CBPiStep):
@action(key="Custom Step Action", parameters=[])
async def hello(self, **kwargs):
print("ACTION")
@action(key="Custom Step Action 2", parameters=[])
async def hello2(self, **kwargs):
print("ACTION2")
async def on_timer_done(self,timer): async def on_timer_done(self,timer):
self.summary = "" self.summary = ""
await self.next() await self.next()