Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - alias: "Spegnimento Kodi"
- initial_state: 'on'
- trigger:
- - platform: state
- entity_id: switch.scenario_samsung_off, switch.scenario_toshiba_off, switch.scenario_western_off
- to: 'on'
- action:
- - service: media_player.turn_off
- entity_id: media_player.kodi
- - delay: '00:00:02'
- - service: script.source
- - delay: '00:00:01'
- - service: script.sinistra
- - delay: '00:00:01'
- - service: script.conferma
- - delay: '00:00:02'
- - service_template: >
- {% if trigger.entity_id == 'switch.scenario_samsung_off' %}
- shell_command.scenario_samsung_off
- {% elif trigger.entity_id == 'switch.scenario_toshiba_off' %}
- shell_command.scenario_toshiba_off
- {% elif trigger.entity_id == 'switch.scenario_western_off' %}
- shell_command.scenario_western_off
- {% endif %}
- shell_command:
- scenario_samsung_off: "curl -k POST 'http://cock46.duckdns.org:50202/?btn=VSCENARIO8&act=1&kp=0'"
- scenario_toshiba_off: "curl -k POST 'http://cock46.duckdns.org:50202/?btn=VSCENARIO6&act=1&kp=0'"
- scenario_western_off: "curl -k POST 'http://cock46.duckdns.org:50202/?btn=VSCENARIO7&act=1&kp=0'"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement