From ca4f79b04e30a597c499716df3710d7ae212befb Mon Sep 17 00:00:00 2001 From: emontnemery Date: Sun, 11 Nov 2018 11:41:40 +0100 Subject: [PATCH] Add example sun condition which is true during daytime (#7267) * Add example condition which is true during daytime * Update conditions.markdown --- source/_docs/scripts/conditions.markdown | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/_docs/scripts/conditions.markdown b/source/_docs/scripts/conditions.markdown index 43da6d2e1a4..6efb7b4b771 100644 --- a/source/_docs/scripts/conditions.markdown +++ b/source/_docs/scripts/conditions.markdown @@ -139,6 +139,16 @@ condition: before: sunrise ``` +```yaml +condition: + condition: and # 'when light' condition: before sunset and after sunrise + conditions: + - condition: sun + before: sunset + - condition: sun + after: sunrise +``` + A visual timeline is provided below showing an example of when these conditions will be true. In this chart, sunrise is at 6:00, and sunset is at 18:00 (6:00 PM). The green areas of the chart indicate when the specified conditions will be true. Graphic showing an example of sun conditions