From c5343253cc8908b6722a014665316936c1e80edd Mon Sep 17 00:00:00 2001 From: Jens Date: Wed, 2 Oct 2019 16:59:29 +0200 Subject: [PATCH] Update automation_sun.markdown (#10532) * Update automation_sun.markdown Implements changes proposed on https://github.com/home-assistant/home-assistant.io/issues/10315 * :pencil2: Tweak --- source/_cookbook/automation_sun.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/_cookbook/automation_sun.markdown b/source/_cookbook/automation_sun.markdown index fafc28a8a64..e83bec979e7 100644 --- a/source/_cookbook/automation_sun.markdown +++ b/source/_cookbook/automation_sun.markdown @@ -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