in this automation i have a numeric state trigger id, that for some reason runs the automation but not passes when i check the “condition” of its own ID tag trigger.
BTW, if i add a condition with the exact same info as the trigger ID - it passed just fine as “true”, while the same trigger ID does not.
i’m sure i am just missing something, but until i can figure it out…
what is this madness???
i use it to control my dumb ac unit when i go to sleep. it keeps the room within the desired temp gap, and turns a fan on and off as well.
it uses an IR remote, and checks the power state of a smart plug to make sure the IR worked and the ac unit is working or not, based on the power draw of the smart plug.
next, i want to add a helper with more numeric options for min and max temp, but even with “fixed” numbers, i m struggling now.
Don’t believe you can manually ‘test’ for a TriggerID, since you’re testing the condition manually and no TriggerID is actually being ‘passed’ to the condition…
in the example below, there is the same automation, but the measure against the “temp sensor”, is not a fixed number but a helper. i created a “min” and “max” helpers with the desired values.
after configuring 2 triggers, and giving them ID tags, i duplicated the triggers as conditions and placed them within the “options” (just to check them, and to make sure i m not completely out of my mind).
however, as seen in the pic. while the “ID tag” fail, the condition passes. you can check the yaml code to see that they are “the same”.
in that case, how come the “tag” fail, but the condition passes? this automation does not trigger at all, although the condition that was supposed to trigger it - does.
(yes, i know its disabled)
im so not getting what is wrong with my code…
please help
cheers
ps
i do feel like my explanations are a little “all over the place”, so if any other clarification is needed - please ask.
i’ll be more than happy to assist you all to help me…
Numeric state triggers fire only on the state change of the entity given for entity_id (in your case the Sensor), changing the value of an entity listed under above or below (in your case the Input number) will make a condition true, but it will not cause a trigger to fire… and will not create a trigger.id that can be checked by the Trigger condition. If you need it to fire on the change or either entity, you will need to use a Template trigger or two Numeric state triggers.
as that give out the number selected by the given entity.
where would i place it in the code for this automation to work, taking into account the number given by the helpr?
as this section in the automation - does not triger
though - as mentioned - it does passes as “true” when i check the “condition”
so i deleted the value from the template, and its looks like this now, and now it works.
i set both helpers to (min and max) to 25, and manually set the temp sensor to 30 and 20 (back and forth), and the automation triggers.
alias: bd ac test temp control with helpers
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.studie_badroom_avg_temp
below: input_number.bd_ac_min_temp
id: min
- platform: numeric_state
entity_id: sensor.studie_badroom_avg_temp
above: input_number.bd_ac_max_temp
id: max