Hi everyone, i have a script called by an automation, this script turns on the HVAC, set mode, temperature, fan etc and sends me a notification.
It’s the same script in 5 differents copies for my 5 HVAC, i unfortunately noticed that most of the times it does not set “eco” mode while turning on them, but i don’t really understand why.
Is there a way to be sure that eco mode is enabled or at least to check it continuosly when the any HVAC is on?
Here’s the script:
accensione_pdc_camera_micol:
sequence:
# Accendo PDC
- service: climate.turn_on
entity_id: climate.daikin_camera_micol
- delay: '00:00:05'
# Imposto temperatura a 19°C
- service: climate.set_temperature
target:
entity_id: climate.daikin_camera_micol
data:
temperature: '19'
hvac_mode: 'heat'
- delay: '00:00:05'
# Imposto in modalità Eco
- service: climate.set_preset_mode
target:
entity_id: climate.daikin_camera_micol
data:
preset_mode: "Eco"
- delay: '00:00:05'
# Ventola in modalità Auto
- service: climate.set_fan_mode
target:
entity_id: climate.daikin_camera_micol
data:
fan_mode: "Auto"
# Avvio timer
- service: timer.start
target:
entity_id: timer.attesa_avvio_pdc
- delay: '00:00:05'
# Invio notifica
- service: notify.christian
data_template:
title: '*PDC Camera Micol'
message: >
Accesa in autoconsumo
Lettura Contatore: {{states('sensor.lettura_contatore_filtrata')}} W,
Temperatura Attuale: {{states('sensor.temperatura_camera_micol')}}°C
P.S. I already tried with a wait like the one below, but it did not work either:
- repeat:
sequence:
- service: climate.set_preset_mode
target:
entity_id: climate.daikin_camera_micol
data:
preset_mode: "Eco"
- delay:
seconds: 5
until:
- condition: or
conditions:
- condition: state # stop looping if it changes
entity_id: climate.daikin_camera_micol
attribute: preset_mode
state: "Eco"
- condition: template
value_template: "{{ repeat.index > 2 }}" # stop trying after three attempts.