is my current code i like to be able to do is auto entites have a Press or Toggle… that will Restart all the entites it finds for the tplink and Restart
but so far i havent found how to do it… is it possible or no you can only toggle lights on or off
or is there a script that can take the auto entities and restart them if you cant have it in the header
@Hellis81
ya so i have multiple devices like shelly or reolink cameras and they all button press’s but the auto entities doesnt offer a toggle or a press in the header to reboot all the entities generated in the auto entities display… so if i wanted to do all words “restart” then the toggle or press would hit those buttons like it does for toggle restart like ESP home devices
but if there isnt a way to do it then a script that generates the the auto entities in a script and restarts them all
and i not sure where to put that code i did for entity_id and name but it comes up blank
ok that seems to be working i did get an error but i couldnt copy it or screen capature fast enough saying failed something something devices like where you see “message mailformed”
but it seems to work so it takes 1 entity restarts waits 2 seconds then goes to the 2nd one
is how i take it works
i was able to make it work for my ReoLink Cameras worked easy no more single pressing anymore
is this specfic to home assistant programmers that know all that… or is it like learning SQL or a different programming… it seems like SQL but i learned that 30 years but didnt never needed it in everyday life programming in Visual Basic as much later on…
@Hellis81 ok ill try to remember the templating page and such i thought it was like sql days when reading info from a table but i stopped programming like 10 years ago on a regular basis
so thats cool the trace shows the steps i see the one trace is all blank thats where i guess the script “failed” as step details trace timeline releated activity script config are all blank. but the previous and after executing same script work fine
unless it failed if i re ran the script if the first time wasnt done yet is that possible? where the script is running but it hasnt gone through all the devices and i hit run again?
I believe the standard setting for scripts are single, which should mean the one running has to finish first, any new runs are exited.
Not sure what happens if you save a script while it’s still running. I guess that could make it exit early.
Templating isn’t easy. My advice is to read the forum for templates and challenge yourself with questions that already have an answer.
How would you solve this template question, then you can always scroll down to get the “answer”.
It obviously takes time to learn it all, so don’t expect it to take just a few days.
I don’t think I’m good at it myself, but I know a few things that gets me where I need.
ah good to know ill try to remember that for the next template i need
i wish we had home assistant in the 90s when i tried to make electronic projects and assembly langauge plc IDE ports it wasnt as nice and my college dropped home automations in early 2000s as you could do what home assistant could do but you had to pay someone 2k or more to come in your home and program custom devices to work… and it was no where as cheap it is today…
learn something new everyday i appreciate the help (: