mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-10 01:17:42 +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):
|
||||
try:
|
||||
actor = self.cbpi.actor.find_by_id(id)
|
||||
return actor.get("instance").get_state()
|
||||
return actor.instance.state
|
||||
except:
|
||||
logging.error("Failed to read actor state in step - actor {}".format(id))
|
||||
return None
|
||||
return False
|
||||
|
||||
async def actor_on(self,id,power=100):
|
||||
|
||||
|
@ -73,4 +73,4 @@ class CBPiBase(metaclass=ABCMeta):
|
|||
try:
|
||||
await self.cbpi.actor.set_power(id,power)
|
||||
except Exception as e:
|
||||
pass
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue