I have no experience with programming or scripts, I would understand how to modify that to put my own variables in, but I don’t know what a curl command is, i assume curl is something i could write at the command prompt, anyway I’m quite clueless as how I can put a curl command into home assistant so i can fire of a curl command from automation.yaml

sorry I am very very very noob, I’m doing things outside of my experience level (which is basically installing home assistant a few weeks ago lol)

I have a open/close sensor and i want to change the state and attributes of an entity (climate.panasonic_aircon), when the sensor changes state. I am ok writing the automation.yaml for this I just get stuck on this part

action:
# magic happens and the state / attributes of the entity changes

Ok. But I see you want to change the state of a device. To do that something has to trigger that state change. This is usually from some “external” source or from an automation or manual flip of a switch inside hassio.

- alias: set climate state to off when aircon turns off
trigger:
- platform: state
entity_id: binary_sensor.door_window_sensor_158d0001f38b1f
from: 'on'
to: 'off'
action:
# change the state of climate.panasonic_aircon to off

edit: i wrote in my post that the state was reverting back, but it’s not the state is sticking. As I test i changed the climate.panasonic_aircon state to “tomatoes” and it is staying as tomatoes, so that is good.

There’s a lot of options, but you would pass them to the entity_id through the data tag. Match the options with your climate component you are using. That’s not a exact example as I’m using the vera temperature component. But gives you an idea.

The curl example I gave before should work with the “script component” just modify it to work. Does the same as the web interface.

However. With using hass.io it is limited to what is provided within hass.io. I don’t run hass.io anymore as it was too limiting as I have a bi-directional setup with a VeraPlus unit as my device controller. So I like having command line access and doing http calls between the two systems.

I fired up ssh into my hassio and i typed the curl command, it is available.

I still don’t know how to make a script with curl command as there is no documentation or examples.

like do i type that example into a text file and save it with the .py extension, where do i save it etc… i have done a lot of googling but I can’t find any tutorial or existing example that i can use to figure out how to fire off that curl command from inside an automation in hassio.

Im been strugeling for 15 hours straight now trying to accomplish the same thing as you.
Im using xeoma and has moved from Switchking to HA recently.

Erlier i sent http request like h_ttp://switchking_ip/devies/“device number”/turn_on when motion was detected.

As i understand you have made some binary sensor to listen to request from xeoma.

Trued to used command_line platform, restful-command and i have no clue what im doing wrong.
Even tried to send http request as h_ttp://ip-to my ha server/api/services/switch.turn_on/switch.my_entity
And also h_ttp://ip-to my ha server/api//switch.turn_on/switch.my_entity
But no luck.
when running h_ttp://ip-to my ha server/api/services/switch.turn_on/switch.my_entity i get 405 not allowed and h_ttp://ip-to my ha server/api//switch.turn_on/switch.my_entity (404 not found).