If the entities youâre using in your trigger were already on, then itâs not gonna trigger, because the trigger happens when the entity changes state, and thereâs no state transition when âonâ goes to âonâ.
Maybe you can turn your second automation on directly with the automation.trigger service, and then that automation, when triggered, can turn your input booleans on. Then in the same automation, you add a second trigger that, when your input booleans are turned off, it undoes whatever it did during the first triggger.
Whatâs your goal, ultimately, with the input booleans and the automation?
When examining an automation, itâs trigger section effectively documents the criteria for activating it. By employing automation.trigger, an entirely different activation criteria is employed thatâs external to the automation.
In other words, the automation is no longer self-contained but a cog in a larger mechanism thatâs not self-evident.
Iâm interested in consolidating both automations into a single one, and i think there is a pretty simple way I can do this. Iâll post back if I get into difficulties!
However, having reviewed the second automation, it doesnât actually matter if it doesnât fire if both booleans are already on, so its fine.
Whatâs the purpose of the two input_booleans in terms of controlling the TRVs? Do you ever turn them on manually or are they only turned on at 6:30 by the automation?
And to add to this.
If you need to trigger an automation, then what you need is a script.
To make things easier to debug then keep automations on âautoâ and the scripts are manually run or run by an automation. Mixing the two will just make it hard.
The input booleans are switches for two generic thermostats connected to two TRVâs that donât have a heater switch entity, so I turn them on an off via an automation.
However, this second automation also has a time condition so it doesnât fire between the hours of 10.30pm and 6.29am, because the actuators on the TRvâs can be noisy in the silence of the night.
This means that there is a potential that the input boolean can be out of sync with the TRV, if the generic thermostat turns it on/off, but the time condition aborts the automation run.
So what I do is at 6.30am, incase thats happened in the night, I set the input booleans to âonâ, because this is also the time the main boiler kicks in for the house. (The TRVâs canât call for heat, they are just acting as limiters).
This is both automations:-
alias: Guest Room(s) TRV's on from 6.30am
description: Turn On TRV's from 6.30am
trigger:
- platform: time
at: "06:30:00"
condition: []
action:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.green_room_trv_switch
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.ensuite_room_trv_switch
mode: single