From 469c111e9850339c1b6a4bcbc87260d03278908c Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Tue, 7 Mar 2023 16:19:14 -0500 Subject: [PATCH] More improvements to Good Morning routine --- node-red/projects/NerdFlows | 2 +- packages/lighting_and_scenes.yaml | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/node-red/projects/NerdFlows b/node-red/projects/NerdFlows index c7f682d..e666ca4 160000 --- a/node-red/projects/NerdFlows +++ b/node-red/projects/NerdFlows @@ -1 +1 @@ -Subproject commit c7f682d96a684d7d7f6121a98a2f102c7010f9e6 +Subproject commit e666ca4af900bd7162527ef7023f295561277da8 diff --git a/packages/lighting_and_scenes.yaml b/packages/lighting_and_scenes.yaml index b22fd0b..b250ecb 100644 --- a/packages/lighting_and_scenes.yaml +++ b/packages/lighting_and_scenes.yaml @@ -1185,9 +1185,16 @@ script: target: entity_id: input_boolean.master_bedroom_sleeping - if: - - condition: numeric_state - entity_id: sensor.pirateweather_cloud_coverage - above: 50 + - condition: template + value_template: > + {% set weather = states('weather.iron_nerd_weather_station') %} + {% if weather in ['cloudy','partlycloudy','rainy','snowy','hail','lightning','lightning-rainy','pouring','snowy-rainy'] %} + true + {% elif (states('sensor.pirateweather_cloud_coverage') | int) > 50 %} + true + {% else %} + false + {% endif %} then: - if: - condition: template