Update automation_sun.markdown (#10532)

* Update automation_sun.markdown

Implements changes proposed on https://github.com/home-assistant/home-assistant.io/issues/10315

* ✏️ Tweak
This commit is contained in:
Jens 2019-10-02 16:59:29 +02:00 committed by Franck Nijhof
parent 8f6578449e
commit c5343253cc

View File

@ -73,7 +73,7 @@ Solar elevation automations can cope with offsets from sunset / sunrise as the s
trigger:
platform: numeric_state
entity_id: sun.sun
value_template: '{% raw %}{{ state.attributes.elevation }}{% endraw %}'
value_template: "{% raw %}{{ state_attr('sun.sun', 'elevation') }}{% endraw %}"
below: 3.5
action:
service: scene.turn_on
@ -83,7 +83,7 @@ Solar elevation automations can cope with offsets from sunset / sunrise as the s
trigger:
platform: numeric_state
entity_id: sun.sun
value_template: '{% raw %}{{ state.attributes.elevation }}{% endraw %}'
value_template: "{% raw %}{{ state_attr('sun.sun', 'elevation') }}{% endraw %}"
below: 1.5
action:
service: scene.turn_on
@ -93,7 +93,7 @@ Solar elevation automations can cope with offsets from sunset / sunrise as the s
trigger:
platform: numeric_state
entity_id: sun.sun
value_template: '{% raw %}{{ state.attributes.elevation }}{% endraw %}'
value_template: "{% raw %}{{ state_attr('sun.sun', 'elevation') }}{% endraw %}"
below: -2.5
action:
service: switch.turn_off