Hello,
Anyone could take picture of configured visual editor of automation for such a timer ?
I am really struggling to configure it via Yaml.
Complete beginner.
Hello,
Anyone could take picture of configured visual editor of automation for such a timer ?
I am really struggling to configure it via Yaml.
Complete beginner.
This is what I use, hope it helps. Only if the timer is active (running), then it has the timer (Re)Start at whatever the value was when you stopped touching the slider (if you changed it’s value).
alias: >-
Basement Light Above Laundry Table Slider Adjustment -> if Timer Active ->
Update Timer
description: ""
trigger:
- platform: state
entity_id:
- input_number.basement_adjust_light_above_laundry_table_timer
condition:
- condition: state
entity_id: timer.basement_light_above_laundry_table_timer
state: active
action:
- service: timer.start
data:
duration: >-
{{(((states('input_number.basement_adjust_light_above_laundry_table_timer')
| int) * 60) | string) }}
target:
entity_id: timer.basement_light_above_laundry_table_timer
mode: parallel
max: 1000
What I think might be throwing you off, is the trigger in the visual editor is confusing in that you leave the to and from values blank (so it’s triggered if there is any change at all):
Well, I stand corrected as well, the updating of the timer had to be in yaml too…
In my case, my slider I use is in minutes - but any timer is updated by the number of seconds. If your slider is meant to be seconds, then get rid of the *60. Oh and if you want the slider to turn on the timer (if it is not active) then just remove the condition. What we shoud code that would be really neat would be to also have the slider move on it’s own as the time counts down. But, then you’d have code running all the time while timer is couting down (to adjust the slider position) and in my opinion that would be a waste of resources (but you can throw more haredware behind it and go to town!).
So you want an automation that when the electic blanket is turned on the timer is started,. and when the timer is finishewd the electic blaned its turned off…?
Lastly, almost all of my automations I have in parallel mode, with essentially no loimit to how many things can run at the same time… but I keep all of my automations with minimal code - and allow one automation to launch another (for example, any motion in a room just (re)starts a timer, then if the timer was not already running and is started that would trigger turning on a light the timer finishing would turn off the light. You can get as ridiiculous as you want, for example I hgave switched in my dashboards to enable or disable automations, so that have to be taken into consideration in if statements, also if I have code that does the same kinds of steps but with different rooms and different devices, then I write a generic script that takes as it’s argument the devices or timers or sliders what have you, and then call that from all over the place (much less code!). Have fun! My home is so automated it’s gertting ridiculous but it’s really fun stuff! Reminders about the garage open, if my weather station detects rain and a certain window is open we get a text message about it, leak sensors evedrywhere so I know as soon as there is a leak even if not home (and the police are automatically called if I do not respond)… Sorry I’ll stop now!
Hello KruseLuds. The timer is not for electric blanket, that was just internet example. I want to use it to temporarily switch off my Living room underfloor heating. So when I make fire in my fireplace, I just set timer to close valves lets say for 6 hours whilst fireplace is heating in living room. In future I will automate it further, so when I make fire i the valves will close automatically. And rest of house will be heated normally.
Thanks for your detailed explanation, I did not now it can not be configured purely by Visual editor and Yaml have to be used too.
( omg, that code in bracket, i would not be able to make on my own)
I will make program according to your guide, and hopefully I will return back here in few days with working solution : )