Automation: set sommer and winter time by date/month via condition

Hello all,

I want to determine the season with a rule.

However, I despair at the “Condition”

Background: I want to set a mode for my heating and ventilation system.

  - alias: "set_season"
    trigger:
      - platform: time
        at: "00:03:00"
    condition:
      condition: template
      value_template: 'states.sensor.date__time.attributes.date =={{ range(2000, 2099) }}-{{ range(7, 12) }}-1}}'
    action:
      - service: input_select.select_option
        data_template:
          entity_id: input_select.season
          option: 'Winter'

You can use the sensor.season:

https://www.home-assistant.io/components/sensor.season/

3 Likes