fixed scene watchers
This commit is contained in:
@@ -13,9 +13,9 @@ scene_detect:
|
||||
module: scene_detect
|
||||
class: MotionCanceller
|
||||
scene: bedsport
|
||||
app: bedroom
|
||||
app: bedroom_motion
|
||||
|
||||
scene_detect:
|
||||
scene_detect2:
|
||||
module: scene_detect
|
||||
class: MotionCanceller
|
||||
scene: in_bed
|
||||
|
||||
@@ -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')
|
||||
Reference in New Issue
Block a user