Hello,
i would like support with my first automation.
Goal is to reduce the heating temperature in 5 rooms during the night.
The children should sleep with 17°C. During the day it should be 20°C
I wrote 2 scripts: One for daytime one for nighttime.
How do i automatically run them ?
The script heizungen_tagbetrieb should be active from 05:30 until 20:30
The script heizungen_nachtbetrieb should be active from 20:30 until 05:30
What do i need ? Switches ? Automations ? I am new to this so please be patient with me
Here the 2 scripts:
heizungen_tagbetrieb:
alias: "Heizungen Tagebetrieb“
sequence:
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1
temperature: 20
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_3
temperature: 20
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_4
temperature: 20
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_5
temperature: 20
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_6
temperature: 20
heizungen_nachtbetrieb:
alias: "Heizungen Nachtbetrieb“
sequence:
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1
temperature: 17
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_3
temperature: 17
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_4
temperature: 17
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_5
temperature: 17
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_6
temperature: 17
Here a Switch:
- platform: template
switches:
wohnzimmer_heizungen:
value_template: "{{ is_state_attr('climate.danfoss_devolo_home_control_radiator_thermostat_heating_1', 'operation_mode', 'heat') and is_state_attr('climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_3', 'operation_mode', 'heat') and is_state_attr('climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_4', 'operation_mode', 'heat') and is_state_attr('climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_5', 'operation_mode', 'heat') and is_state_attr('climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_6', 'operation_mode', 'heat') }}"
turn_on:
service: homeassistant.turn_on
entity_id: script.heizungen_tagbetrieb
turn_off:
service: homeassistant.turn_on
entity_id: script.heizungen_nachtbetrieb
Regards
I am running Hassio on a Raspi4 with a zwafe usb stick and devolo thermostats.
tom_l
January 17, 2020, 11:40am
3
Notice how your first lot of pasted code is all red?
heizungen_tagbetrieb:
alias: "Heizungen Tagebetrieb“
^-- You have used the wrong sort of quote here
Hello Tom,
i fixed it and was now able to safe the 2 scripts.
heizungen_tagbetrieb:
alias: "Heizungen Tagebetrieb"
sequence:
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1
temperature: 20
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_3
temperature: 20
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_4
temperature: 20
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_5
temperature: 20
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_6
temperature: 20
heizungen_nachtbetrieb:
alias: "Heizungen Nachtbetrieb"
sequence:
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1
temperature: 17
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_3
temperature: 17
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_4
temperature: 17
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_5
temperature: 17
- service: climate.set_temperature
data:
entity_id: climate.danfoss_devolo_home_control_radiator_thermostat_heating_1_6
temperature: 17
How do i proceed now?
How would the Automation look like?
alias: Heizung Tag und Nachtbetrieb
trigger:
platform: time
at: "05:30:00"
action:
- service: my scripts?
data:
entity_id:
operation_mode: "??
tom_l
January 17, 2020, 12:32pm
5
Scripts are services so it is as simple as:
alias: Heizung Tag und Nachtbetrieb
trigger:
platform: time
at: "05:30:00"
action:
service: script.heizungen_nachtbetrieb
Hello Tom,
do i have to stop the dayheating service before starting the nightheating service?
or is this sufficient ?
- alias: Heizung Tag und Nachtbetrieb
trigger:
platform: time
at: '05:30:00'
action:
- service: script.heizungen_tagbetrieb
- alias: Heizung Tag und Nachtbetrieb
trigger:
platform: time
at: '20:30:00'
action:
- service: script.heizungen_nachtbetrieb
?
You don’t need to stop it. Just run the first on at some time, and the run the second one at another time. That’s it.
Thank You!
I will test it and report
tom_l
January 17, 2020, 2:03pm
9
The aliases of your automations should be changed to unique strings. HA will just append _1
to the second one but for your clarity change them.
It works. I played around with the times a bit to test the setup. it takes some time before all thermostats get the new temperatures. I guess this is to be expected due to the Z Wafe protocol.
Notice the switch at the bottom. This way i can also manually activate the scripts / Services.
Thank You !
Good Morning,
i have a question regarding the element card that i created:
Last evening i left the switches in the position shown in the last picture.
This morning the daytime script did not run at 05:30:00.
What do the switches do ?
They disable the scripts and thereby the platform time automation can not run ?
tom_l
January 18, 2020, 9:42am
12
Enable or disable the automations. The top one is enabled. The bottom one is disabled and will not run at the specified time.
If you want to trigger them manually you have two options:
Click on the automation name and select “Execute” in the pop-up card.
Add the scripts to the card instead of the automations. They will have an “Execute” button next to them.