Files
homeassistant_config/config/01capteur/switch/ipx800.yaml.old
2024-05-31 09:39:52 +02:00

51 lines
3.0 KiB
YAML

- platform: command_line
switches:
ipx800_out1:
command_on: 'curl http://10.0.0.9/preset.htm?led1=1 >/dev/null'
command_off: 'curl http://10.0.0.9/preset.htm?led1=0 >/dev/null'
command_state: 'curl http://10.0.0.9/status.xml'
value_template: '{% set status = value | regex_findall_index("<led0>(.*)</led0>") %} {% if status == "1" %} true {%- endif -%}'
friendly_name: 'IPX800 Out 1'
ipx800_out2:
command_on: 'curl http://10.0.0.9/preset.htm?led2=1 >/dev/null'
command_off: 'curl http://10.0.0.9/preset.htm?led2=0 >/dev/null'
command_state: 'curl http://10.0.0.9/status.xml'
value_template: '{% set status = value | regex_findall_index("<led1>(.*)</led1>") %} {% if status == "1" %} true {%- endif -%}'
friendly_name: 'IPX800 Out 2'
ipx800_3:
command_on: 'curl http://10.0.0.9/preset.htm?led3=1 >/dev/null'
command_off: 'curl http://10.0.0.9/preset.htm?led3=0 >/dev/null'
command_state: 'curl http://10.0.0.9/status.xml'
value_template: '{% set status = value | regex_findall_index("<led2>(.*)</led2>") %} {% if status == "1" %} true {%- endif -%}'
friendly_name: 'IPX800 Out 3'
ipx800_out4:
command_on: 'curl http://10.0.0.9/preset.htm?led4=1 >/dev/null'
command_off: 'curl http://10.0.0.9/preset.htm?led4=0 >/dev/null'
command_state: 'curl http://10.0.0.9/status.xml'
value_template: '{% set status = value | regex_findall_index("<led3>(.*)</led3>") %} {% if status == "1" %} true {%- endif -%}'
friendly_name: 'IPX800 Out 4'
ipx800_out5:
command_on: 'curl http://10.0.0.9/preset.htm?led5=1 >/dev/null'
command_off: 'curl http://10.0.0.9/preset.htm?led5=0 >/dev/null'
command_state: 'curl http://10.0.0.9/status.xml'
value_template: '{% set status = value | regex_findall_index("<led4>(.*)</led4>") %} {% if status == "1" %} true {%- endif -%}'
friendly_name: 'IPX800 Out 5'
ipx800_out6:
command_on: 'curl http://10.0.0.9/preset.htm?led6=1 >/dev/null'
command_off: 'curl http://10.0.0.9/preset.htm?led6=0 >/dev/null'
command_state: 'curl http://10.0.0.9/status.xml'
value_template: '{% set status = value | regex_findall_index("<led5>(.*)</led5>") %} {% if status == "1" %} true {%- endif -%}'
friendly_name: 'IPX800 Out 6'
ipx800_out7:
command_on: 'curl http://10.0.0.9/preset.htm?led7=1 >/dev/null'
command_off: 'curl http://10.0.0.9/preset.htm?led7=0 >/dev/null'
command_state: 'curl http://10.0.0.9/status.xml'
value_template: '{% set status = value | regex_findall_index("<led6>(.*)</led6>") %} {% if status == "1" %} true {%- endif -%}'
friendly_name: 'IPX800 Out 7'
ipx800_out8:
command_on: 'curl http://10.0.0.9/preset.htm?led8=1 >/dev/null'
command_off: 'curl http://10.0.0.9/preset.htm?led8=0 >/dev/null'
command_state: 'curl http://10.0.0.9/status.xml'
value_template: '{% set status = value | regex_findall_index("<led7>(.*)</led7>") %} {% if status == "1" %} true {%- endif -%}'
friendly_name: 'IPX800 Out 8'