passe en yaml et modifie ta condition
j’ai fait ceci pour avoir du chauffage 1h30 avant mon départ en cours:
alias: "Chauffage si cours "
description: Chauffage si cours td tp
trigger:
- platform: calendar
event: start
offset: "-1:30:0"
entity_id: calendar.xxxxxx
condition:
- condition: and
conditions:
- condition: template
value_template: >-
{% if (((now().timestamp() | timestamp_custom('%H:%M')) > '05:00' )
and ((now().timestamp() | timestamp_custom('%H:%M')) < '08:30')) %}
true {% else %} false {% endif %}
- condition: template
value_template: >-
{% if ('cours' in state_attr('calendar.xxxx','message')|lower) or
('tp' in state_attr('calendar.xxxx','message')|lower) or ('td' in
state_attr('calendar.xxxx','message')|lower) or ('eval' in
state_attr('calendar.xxxx','message')|lower) %} true {% else %}
false {% endif %}
action:
- service: climate.set_temperature
data:
temperature: 19
target:
area_id: rez_de_chaussee
entity_id: climate.rez_de_chaussee
mode: single
ce qui t’intéresse est dans la deuxième condition