i am trying to get HA to notify me when my thermostat reads a current_temperature that is +3 degrees of my target_temp_high or -3 degrees or my target_temp_low. my action works just fine and i have no conditions, so it’s just a trigger issue. i am including the entities of the thermostat along with the yaml code of the non-working trigger.
thank you, both! i understand the concept of how the template trigger works, but i’m still get failing traces when i manually run the automation. for testing, i have inverted the temp variables, so instead of +5 on the target_temp_high, i am using -5, and vice verse. am i missing something, like a dedicated template somewhere that this is supposed to be linking to? i’ve never used templates before, that i am aware of, but it feels like i’m now missing another piece of a puzzle.
oh, ok, thank you for your confirmation of the trace not working in this manner. i thought that running the automation manually and then checking the traces would show if the “when” would have activated. the action, listed as “Then Do” works just fine. it works every time i manually run. but it did that before i had your code, so it seems the trace is a useless button for manually checking something.
so i guess you just gotta let it be and hope the automation triggers naturally. if it doesn’t trigger naturally, it doesn’t seem like the trace can show anything. so it either works and the trace can confirm it worked, or it doesn’t work and the trace cannot show you anything. no manual run allows the trace to work. thats sad. seems pointless.
the next time i can confirm that the automation should have triggered and does trigger, i’ll mark your answer as the solution. thank you again.
this did not work. i forced a failure of the furnace, so the thermostat still read correctly but could not tell the furnace to heat/cool. the automation did not trigger. i did change from +/- 5 to +/- 1 for this test.
included is the automation i have, minus the email address for my notification, and a screenshot of the thermostat not within temp.
Your “this” isn’t the same as mine. You’re using is_state_attr instead of state_attr, so the template will always fail. Why did you change my suggestion?
i think i changed that, and forgot it change it back, when i was doing my initial testing using the trace function. i’ll do the forced fail again and see now that i’ve removed the “is_” from the command, all four locations.