I have googled and thought I got the answer through this forum but I seem to be missing something (sorry I’m new to this!)
I’m trying to trigger automations once per day, I’ve set up a helper (input_boolean) and have created a automation to reset (off) this every night at 12am.
In my automation for the light I have added a condition stating that the input_boolean must be off, then in the action section it will turn the input_boolean on stopping it from turning on again automatically (lights are motion activated)
I’m not sure where i’m going wrong with this but i have tried multiple times!
(all my automations are done in the configuration > automation section on HASS (Using the UI, not YAML))
Your reset automation doesn’t actually reset your input_boolean, the action section of your automation:
action:
- condition: state
entity_id: input_boolean.mbmainlighttoggle
state: 'off'
uses condition, which checks to see if the condition is true before it carries on through further actions (which it isn’t, so it exits the automation at this point).
If you actually want to turn off the input boolean then you need to call the service input_boolean.turn_off as below.
alias: Master Bedroom Main Light Reset
description: ''
trigger:
- platform: time
at: '00:00:00'
condition: []
action:
- service: input_boolean.turn_off
entity_id: input_boolean.mbmainlighttoggle
mode: single
What @charlyr said about the reset automation is doubly true for the light automation…
By using a Condition action instead of a Call Service, you have created an automation that will never turn on the light, because the input boolean cannot be both “on” and “off” at the same time.