As mentioned by others, manually triggering an automation will only execute the action (the trigger and condition are skipped). Use dennis84de’s suggestion to prevent skipping the condition:
Anyway, I didn’t post just to repeat what others have already stated but to mention that you can streamline your template like this:
condition: '{{ now().month in [1, 12] }}'
It appears on one line because it employs the shorthand notation for Template Conditions. In addition it checks if the current month exists in a list of months. This is a more compact way, especially if there are several possible valid months.
Hey everybody. I have been a Home Assistant user for a few hours and already the friendliness in this community is overwhelming. Thank you all who replied to my question - not only solving my misunderstanding, but even providing a better solution.
I should clarify that the OR-condition with seasons didn’t use to be there, it’s a part of me trying to get this to work at least a little bit.
All the other conditions tests green where expected (it’s not summer so that won’t turn green)
alias: Close Cover at bedtime
description: ''
trigger:
- at: '19:30'
platform: time
condition:
- condition: template
value_template: ' "{{ now().month in [4,5,6,7,8,9,10] }}"'
- condition: state
entity_id: input_boolean.manual_control_barnensrum
state: 'off'
- condition: or
conditions:
- condition: state
entity_id: sensor.season
state: spring
- condition: state
entity_id: sensor.season
state: summer
action:
- data: {}
entity_id: cover.rullgardin_barnens_rum
service: cover.close_cover
- data: {}
entity_id: cover.rullgardin_sovrummet
service: cover.close_cover
- service: cover.close_cover
target:
entity_id: cover.rullgardin_allrum
data: {}
mode: single