fixed scene watchers
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from appdaemon.plugins.hass.hassapi import Hass
|
||||
|
||||
import asyncio
|
||||
|
||||
class SceneDetector(Hass):
|
||||
def initialize(self):
|
||||
@@ -21,5 +21,6 @@ class SceneDetector(Hass):
|
||||
class MotionCanceller(SceneDetector):
|
||||
async def scene_detected(self):
|
||||
await super().scene_detected()
|
||||
await asyncio.sleep(0.5) # needed for when the scene gets turned on from everything being off because of competing callbacks
|
||||
app = await self.get_app(self.args['app'])
|
||||
await app.cancel_motion_callback(new='off')
|
||||
await app.cancel_motion_callback(new='off')
|
||||
|
||||
Reference in New Issue
Block a user