diff --git a/packages/presence.yaml b/packages/presence.yaml index 560490d..efdccdb 100644 --- a/packages/presence.yaml +++ b/packages/presence.yaml @@ -342,6 +342,28 @@ script: entity_id: input_select.dining_room_lamp_scenes data: option: Full + else: + - if: + - 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 + {% else %} + false + {% endif %} + - condition: not + conditions: + - condition: sun + after: sunset + after_offset: -00:30 + then: + - service: light.turn_on + target: + area_id: + - living_room + - dining_room + - mud_room - service: script.welcome_home mode: single icon: mdi:home-account \ No newline at end of file