From 147513b7c7c947ddb543af01dc4821fedcb48129 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Fri, 10 May 2019 15:13:02 +0200 Subject: [PATCH] Update conditions.markdown --- source/_docs/scripts/conditions.markdown | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/_docs/scripts/conditions.markdown b/source/_docs/scripts/conditions.markdown index db552067b5d..5f9848af2de 100644 --- a/source/_docs/scripts/conditions.markdown +++ b/source/_docs/scripts/conditions.markdown @@ -119,7 +119,7 @@ condition: ``` ### {% linkable_title Sun condition %} -#### Sun state condition +#### {% linkable_title Sun state condition %} The sun state can be used to test if the sun has set or risen. ```yaml @@ -136,9 +136,10 @@ condition: state: 'below_horizon' ``` -#### Sun elevation condition +#### {% linkable_title Sun elevation condition %} The sun elevation can be used to test if the sun has set or risen, it is dusk, it is night etc. when a trigger occurs. -For an in depth explanation of sun elevation see [sun trigger][sun_trigger]. +For an in depth explanation of sun elevation see [sun elevation trigger][sun_elevation_trigger]. +[sun_elevation_trigger]: /docs/automation/trigger/#sun-elevation-trigger ```yaml condition: @@ -156,7 +157,7 @@ condition: value_template: {% raw %}'{{ states.sun.sun.attributes.elevation < -6 }}'{% endraw %} ``` -#### Sunset/sunrise condition +#### {% linkable_title Sunset/sunrise condition %} The sun condition can also test if the sun has already set or risen when a trigger occurs. The `before` and `after` keys can only be set to `sunset` or `sunrise`. They have a corresponding optional offset value (`before_offset`, `after_offset`) that can be added, similar to the [sun trigger][sun_trigger]. [sun_trigger]: /docs/automation/trigger/#sun-trigger