Smart Home Automation Forum

Full Version: integrate home assistant by http url command sample
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
here is a http url command integrate with home assistant config demo sample for button5 (thanks for our customer supplied the config code)

- platform: command_line
  switches:
    poolbtn5:
        command_on: "curl -k --silent 'http://192.168.1.136/sw_ctl.cgi?Relay05=ON&postpwd=12345'"
        command_off: "curl -k --silent 'http://192.168.1.136/sw_ctl.cgi?Relay05=OFF&postpwd=12345'"
        command_state: curl -k --silent 'http://192.168.1.136/sw_ctl.cgi?RelayFF=RD&postpwd=12345' | grep -oP "(?<=btn5)(.*)(?=btn6)"
        value_template: '{{"ON" in value}}'
        friendly_name: poolbtn5
how to use these integrate home assistant by http url command sample?
we suggest integrate home assistant by MQTT. if you really want integrate with http, you can see the above configure of yaml file.