I'm trying to add in a timer field that can count down if enabled, but only if enabled, and when it's done, the action is to turn off the air con. Sounds simple in theory, but I can't get it to play nice. My theory is I have a toggle button to "enable" timer, and a text field below that you say how long. If the aircon is turned on, and the enabled toggle is ...enabled, then that is a trigger that calls a counter based on the variable of that field (issue #1, can't get the counter to read and use that field). Once that's done, it's a trigger in itself that calls an action that turns the aircon off. (issue #2, where do i have that trigger set, a separate automation, but how do i tell it when counter runs to zero, and not just IS zero?)
I'm sure it's going to be a mix of script and automation for some reason but i also feel like i'm over complicating it. Please help?