Hi,
Is there any way to set heating months e.g. from October to April and use this variable in another autiomations?
Hi,
Is there any way to set heating months e.g. from October to April and use this variable in another autiomations?
You could use this template:
{{ ( utcnow().month > 10 ) or ( utcnow().month < 4 ) }}
Either directly in a condition or in a template binary sensor:
- platform: template
sensors:
heating_month:
friendly_name: Heating Month
entity_id: sensor.time
value_template: "{{ ( utcnow().month > 10 ) or ( utcnow().month < 4 ) }}"
Edit: I think order of operations requires brackets (so you dont do 10 or utcnow()month
first)