Update restart_ha_if_wemo_switch_is_not_detected.markdown (#591)

This commit is contained in:
Dani 2016-06-28 06:43:57 +02:00 committed by Paulus Schoutsen
parent a833efa18a
commit cd648c06f3

View File

@ -61,22 +61,22 @@ script:
entity_id: switch.killhass entity_id: switch.killhass
automation: automation:
- alias: "Restart HA if WeMo switch isn't found after 15 minutes" - alias: "Restart HA if WeMo switch isn't found after 15 minutes"
trigger: trigger:
platform: state platform: state
entity_id: device_tracker.wemo entity_id: device_tracker.wemo
from: 'not_home' from: 'not_home'
to: 'home' to: 'home'
condition: condition:
- platform: template - condition: template
value_template: {% raw %}'{% if states.switch.wemo %}false{% else %}true{% endif %}'{% endraw %} value_template: {% raw %}'{% if states.switch.wemo %}false{% else %}true{% endif %}'{% endraw %}
- platform: state - condition: state
entity_id: script.restarthawemo entity_id: script.restarthawemo
state: 'off' state: 'off'
action: action:
service: homeassistant.turn_on service: homeassistant.turn_on
entity_id: script.restarthawemo entity_id: script.restarthawemo
- alias: 'Stop HA' - alias: 'Stop HA'
trigger: trigger:
- platform: state - platform: state
entity_id: switch.KillHass entity_id: switch.KillHass
@ -88,7 +88,7 @@ automation:
platform: template platform: template
value_template: {% raw %}'{% if states.switch.wemo %}true{% else %}false{% endif %}'{% endraw %} value_template: {% raw %}'{% if states.switch.wemo %}true{% else %}false{% endif %}'{% endraw %}
condition: condition:
platform: state condition: state
entity_id: script.restarthawemo entity_id: script.restarthawemo
state: 'on' state: 'on'
action: action: