Hi,
I have automation with several triggers, how can I know the source in order to create a conditional template to define a different comfort temperature according to a flag which will indicate Comfort +.
My wish is to limit the number of automations … Otherwise I could do that with multiple copy / paste …
- alias: 'CONFORT Séjour Semaine'
trigger:
- platform: template
value_template: '{{ states.sensor.time.state == states.input_datetime.sejour_start_semaine_matin.state[0:5] }}'
- platform: template
value_template: '{{ states.sensor.time.state == states.input_datetime.sejour_start_semaine_midi.state[0:5] }}'
- platform: template
value_template: '{{ states.sensor.time.state == states.input_datetime.sejour_start_semaine_soir.state[0:5] }}'
# Conditions are used for other things... time:, workday: etc...
action:
- service: climate.set_temperature
entity_id: climate.thermostat_sejour
data_template:
temperature: '{% if is_state("input_boolean.boost_sejour_semaine_matin", "on") %}
{{ states.input_number.consigne_confort_plus.state }}
{%-elif is_state("input_boolean.boost_sejour_semaine_matin", "off") %}
{{ states.input_number.consigne_confort.state }}
{% endif %}'
Flag is input_boolean, Start time is input_datetime
Temperatures are input_number