Script isn't working to send a http request

Hi, I’ve been trying to control my servo for about a week and a half now. I keep running into issues.

Here is a copy of my configuration.yaml. https://hastebin.com/edoxayerak.makefile

Whenever I remove the script on line 91 - 97 the servo will be operable from the switch, although the purpose of the script was for the switch to function more like a button, returning to its start value after being pressed, although I keep getting invalid config issues when trying to get this to work. See picture: https://i.imgur.com/R1BObvR.png

Would someone be able to possibly correct the config and explain what was wrong?

You have a script component defined as loading from scripts.yaml.
The boiler: isn’t defined inside a component at all. It looks like you are trying to load a boiler component.

remove the boilder code from configuration.yaml and add it to scripts.yaml

Also, you’re going to want to change your entity_id to switch.boiler in 2 places in the script.

Hi treno,

Appreciate the reply. And apologies for the long wait on a response, my internet blacked out.

I’ve copied line 91-97 and pasted that into scripts.yaml and I’ve changed the entity ID’s as so “entity_id: switch.boiler”

Although now on my Web UI I get a script panel, with the switch that defaults back to its start point after the specified delay, It still doesn’t trigger the HTTP command found on line 86 and 87.

Your commands are just http addresses at the moment.

Look into curl to request the url as your command.

There are some examples of using curl from a command here:

Finally, I get it. I’ve just one last hurdle to overcome. So basically when I toggle the switch, it will do move to 35, delay and move back to 0. But I need to assign some kind of notifier to show that its on or off. Would that be difficult to do?

and on a side note thank you so much treno, I just had no idea as to how to put it together, I didn’t realize it was meant to be done like that, I can’t express how stupid and yet happy I feel that this little servo works.