#Easy for you guys ๐Ÿ™‚ I m still learning

1 messages ยท Page 1 of 1 (latest)

mild halo
#

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.

tidal sky
#

I saw mention of that too in the docs I've pored over... the number helper.

mild halo
#

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.

tidal sky
#

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.

mild halo
#

Ah you're working directly in the configuration.yaml file. I just use the GUI elements. Less prone to me mistyping something.

tidal sky
#

Well, no... I prefer not to work in that file if I can help it. That was just one method that was suggested.

mild halo
#

Templating becomes ... Interesting ...

tidal sky
#

I'd like to keep that as untouched as possible.

#

Wow... I'm a ways off from Templating yet.

mild halo
#

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.

tidal sky
#

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.

mild halo
#

I don't really use the code, except for easy sharing of what have been done

tidal sky
#

I try not to use code too much, but in this case, it gives me an idea of what's running in the background.

mild halo
#

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

tidal sky
#

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.

mild halo
#

Call service can do just about everything to everything

tidal sky
#

Starting to make a little more sense now.

mild halo
#

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

tidal sky
#

Interesting....

mild halo
#

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 ๐Ÿ™‚

tidal sky
#

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...

mild halo
#

It is sometimes fun to get lost in holes ๐Ÿ™‚

tidal sky
#

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!

mild halo
#

I just realised how that sounded