You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to constrain my callbacks based on person presence but it is not working. I don't think I'm doing anything wrong because both constrain_presence and constrain_input_boolean are working as expected.
importappdaemon.plugins.hass.hassapiashassclassTimer(hass.Hass):
definitialize(self):
# DEBUG: Log whether my constraints should be appliedifself.noone_home(person=True):
self.log("No one home")
ifself.anyone_home(person=True):
self.log("Anyone home")
ifself.everyone_home(person=True):
self.log("Everyone home")
if"time_on"inself.args:
time_on=self.parse_time(self.args["time_on"])
self.run_daily(self.on, time_on)
if"time_off"inself.args:
time_off=self.parse_time(self.args["time_off"])
self.run_daily(self.off, time_off)
defon(self, kwargs):
fordeviceinself.split_device_list(self.args["entities"]):
self.log("Turning on "+device)
if"brightness"inself.argsand"light."indevice: # API failure if we pass brightness when non-lightself.turn_on(device, brightness=self.args["brightness"])
else:
self.turn_on(device)
defoff(self, kwargs):
fordeviceinself.split_device_list(self.args["entities"]):
self.log("Turning off "+device)
self.turn_off(device)
Logs:
2021-12-31 15:57:27.972737 INFO AppDaemon: App 'Indoor Light Automation Sunset' added
2021-12-31 17:16:11.000000 INFO AppDaemon: Initializing app Indoor Light Automation Sunset using class Timer from module entity_timer
2021-12-31 17:16:14.223652 INFO Indoor Light Automation Sunset: No one home
2021-12-31 17:16:23.000000 INFO Indoor Light Automation Sunset: Turning on light.andrew_desk_lamp
The text was updated successfully, but these errors were encountered:
I'm trying to constrain my callbacks based on person presence but it is not working. I don't think I'm doing anything wrong because both constrain_presence and constrain_input_boolean are working as expected.
My app config:
My app:
Logs:
The text was updated successfully, but these errors were encountered: