mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 16:27:19 +00:00
Update restart_ha_if_wemo_switch_is_not_detected.markdown (#591)
This commit is contained in:
parent
a833efa18a
commit
cd648c06f3
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user