mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-28 17:54:15 +01:00
fix get_actor_state () in CBPiBase
This commit is contained in:
parent
f2e9b1bebc
commit
a7ddcdd306
2 changed files with 4 additions and 4 deletions
|
@ -1 +1 @@
|
||||||
__version__ = "4.0.1.7"
|
__version__ = "4.0.1.8"
|
||||||
|
|
|
@ -51,10 +51,10 @@ class CBPiBase(metaclass=ABCMeta):
|
||||||
def get_actor_state(self,id):
|
def get_actor_state(self,id):
|
||||||
try:
|
try:
|
||||||
actor = self.cbpi.actor.find_by_id(id)
|
actor = self.cbpi.actor.find_by_id(id)
|
||||||
return actor.get("instance").get_state()
|
return actor.instance.state
|
||||||
except:
|
except:
|
||||||
logging.error("Failed to read actor state in step - actor {}".format(id))
|
logging.error("Failed to read actor state in step - actor {}".format(id))
|
||||||
return None
|
return False
|
||||||
|
|
||||||
async def actor_on(self,id,power=100):
|
async def actor_on(self,id,power=100):
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue