- 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("(.*)") %} {% 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("(.*)") %} {% 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("(.*)") %} {% 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("(.*)") %} {% 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("(.*)") %} {% 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("(.*)") %} {% 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("(.*)") %} {% 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("(.*)") %} {% if status == "1" %} true {%- endif -%}'
friendly_name: 'IPX800 Out 8'