#Easy for you guys ๐ I m still learning
1 messages ยท Page 1 of 1 (latest)
There's multiple parts involved
First part is creating the helper. Settings --> Devices & Services --> Helpers --> Create Helper.
A helper is kinda like a variable of a certain type. For the slider, use the numberhelper.
I saw mention of that too in the docs I've pored over... the number helper.
When you have created the number helper, you can simply add an entities card to your dashboard with one entity, that are the number helper you just created. There you have the slider.
Then instead of hardcoded duration in your script, you just reference the value of the slider. This is where it begins to become complex, because then you have to use templates.
So easier approach is to do the timer/buttons approach that is also shown in my example. Because then you can use simple triggers in an automation.
OK, I created the number helper. Since I reloaded YAML once or twice earlier, I can see the slider & box inputs I added to configuration.yaml earlier in the day too.
Those are in the Helpers section too.
I have NOT worked with Templates yet though, to my knowledge.
Ah you're working directly in the configuration.yaml file. I just use the GUI elements. Less prone to me mistyping something.
Well, no... I prefer not to work in that file if I can help it. That was just one method that was suggested.
I'd like to keep that as untouched as possible.
Wow... I'm a ways off from Templating yet.
I would just create a timer helper. Then I would create some button as in my example, which will set the timer to the values specified in the service call for each button.
Then an automation that triggers when the timer helper becomes active and another trigger when the timer helper becomes idle. Active means that the time is counting down. Idle means it's done counting. Then use "active" to turn on lights and "idle" to turn off light.
Interesting... you've given me a lot to experiment with and figure out. Most notably, some code, so I can see how it fits together.
That's where I do better at learning.
I try not to use code too much, but in this case, it gives me an idea of what's running in the background.
That is the GUI for creating a new card on the dashboard. Can always go into the code editor and work with the code there. Ie. you can switch back and forth between UI and code, and it will tell you if there is something wrong with the code
Oh yes it does. I've been on the receiving end of that more than once.
Ah! See, I've not tried the "Call Service" action yet.
THAT is what would be helpful.
Call service can do just about everything to everything
Starting to make a little more sense now.
Doesn't really matter if you use Device or Call Service to turn on lights. Same result, different approach
But something I think can only be done using service calls, such as setting the values of helpers
From the automation that would handle the timer
Note the Trigger ID field that is also on this. This is one you have to add from the 3-dot menu and allows you to have multiple triggers that does different things in the automation
Interesting....
And that is the Actions section, using a Choose action to do a different action depending on which trigger was triggered
Hope that is a bit to get you going. I am out for tonight ๐
I appreciate all of this! It's got me pointed mostly in the right direction. I'll probably end up lost in a bole somewhere, but at least the hole might not be as deep.
Hole, not bole...
It is sometimes fun to get lost in holes ๐
I've found it to be that way, until I get really stuck... then I get frustrated. But - again, TYVM, I appreciate ALL of the help!
I just realised how that sounded