Hi There,
I searched the forum for a central heating timer control that I could use for my particular set up at home. While i found some interesting topics, nothing seemed easy to adapt for my situation. So I started from scratch and have got almost there but the last part is causing me some challenges. Im not very coding savvy so my approach using mostly the UI in the Automation section is probably a bit retarded, but it the best that I can do.
Here is my hardware set up, quite simple really. I have 3 heating zones and each is controlled by a Tuya based Thermostat controllers. I have those integrated using the Tuya Local integration. all working well with a simple time automation. But then there is the wifeâŚshe want to change the times for different days and different zones and she cant do that when they are hard coded in to an automation.
So I created helpers for each day of the week such as: T1_mon, T2_mon, T3_mon, T4_mon etct, etc for each day. T1 being start, T2 being end, T3 being start and T4 being end for each day. Then I created 3 zone selectors for each day of the week as well calling them; "downstairs heating_mon, upstairs heating_mon, kitchenUFH_mon etc, etc.
Here is my control panel:
Next I used the Automations UI to start creating my control logic. Below is the yaml. I found that it got quite complex, very quickly and with many hours of trial and error using the âChooseâ options I finally got what I though was a working automation. Indeed it does turn on and off the heating at the required times, however I can NOT get the conditions or choices to filter out the T1_mon from the T3_fri for example. So if I have a later timer for the weekends say on at 07:00 but during the weekdays I have a timer for 05:00 and off at 06:30, then at 07:00 on the which ever weekday it is, the 07:00 weekend timer will also fire and turn on again the heating. Hopefully that is clearâŚ
I looked at the triggers which are the T1_mon (for example) and wanted to try to add a filter for the actual day of the week, so a âT1_tueâ can not fire on any other day except for a Tuesday, or a âT1_sunâ can only fire on a Sunday, this would solve my problem but I couldnât get it to work. Here is the standard trigger that fires every day at the given platform time:
platform: time
at: input_datetime.mon_t1
enabled: true
And here is my attempt at coding it manually with a mon filter:
platform: time
at: input_datetime.mon_t1
weekday: mon
As I said earlier Im not any good at coding. If i put a day of the week filter in the conditions directly after the Trigger, then it would stop all other timers from getting trough so I dont think that can work unless codedâŚ
Here is my automation.yaml its pretty big so this one just turns on all the T1 & T3âs and a duplicate turns off all the T2 & T4âs. Below the yaml is a screen shot of the Trace which helps to see what happens:
alias: Central Heating Manual Timers - ON
description: ""
trigger:
- platform: time
at: input_datetime.mon_t1
enabled: true
- platform: time
at: input_datetime.mon_t3
- platform: time
at: input_datetime.tue_t1
- platform: time
at: input_datetime.tue_t3
- platform: time
at: input_datetime.wed_t1
- platform: time
at: input_datetime.wed_t3
- platform: time
at: input_datetime.thur_t1
- platform: time
at: input_datetime.thur_t3
- platform: time
at: input_datetime.fri_t1
- platform: time
at: input_datetime.fri_t3
- platform: time
at: input_datetime.sat_t1
- platform: time
at: input_datetime.sat_t3
- platform: time
at: input_datetime.sun_t1
- platform: time
at: input_datetime.sun_t3
condition: []
action:
- choose:
- conditions:
- condition: time
after: input_datetime.mon_t1
weekday:
- mon
sequence:
- choose:
- conditions: []
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.downstairs_heating_mon
state: "on"
sequence:
- device_id: 318e6c3855b310c8162ca1c1e7625cb0
domain: climate
entity_id: climate.downstairs_heating_local
type: set_hvac_mode
hvac_mode: heat
- choose:
- conditions:
- condition: state
entity_id: input_boolean.upstairs_heating_mon
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
entity_id: climate.upstairs_heating_local
- choose:
- conditions:
- condition: state
entity_id: input_boolean.kitchen_ufh_mon
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
device_id:
- cbf47d57c0cc6ef49d19936c65d0e240
- conditions:
- condition: time
after: input_datetime.mon_t3
weekday:
- mon
sequence:
- choose:
- conditions: []
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.downstairs_heating_mon
state: "on"
sequence:
- device_id: 318e6c3855b310c8162ca1c1e7625cb0
domain: climate
entity_id: climate.downstairs_heating_local
type: set_hvac_mode
hvac_mode: heat
- choose:
- conditions:
- condition: state
entity_id: input_boolean.upstairs_heating_mon
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
entity_id: climate.upstairs_heating_local
- choose:
- conditions:
- condition: state
entity_id: input_boolean.kitchen_ufh_mon
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
device_id:
- cbf47d57c0cc6ef49d19936c65d0e240
- conditions:
- condition: time
after: input_datetime.tue_t1
weekday:
- tue
sequence:
- choose:
- conditions: []
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.downstairs_heating_tues
state: "on"
sequence:
- device_id: 318e6c3855b310c8162ca1c1e7625cb0
domain: climate
entity_id: climate.downstairs_heating_local
type: set_hvac_mode
hvac_mode: heat
- choose:
- conditions:
- condition: state
entity_id: input_boolean.upstairs_heating_tues
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
entity_id: climate.upstairs_heating_local
- choose:
- conditions:
- condition: state
entity_id: input_boolean.kitchen_ufh_tues
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
device_id:
- cbf47d57c0cc6ef49d19936c65d0e240
- conditions:
- condition: time
after: input_datetime.tue_t3
weekday:
- tue
sequence:
- choose:
- conditions: []
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.downstairs_heating_tues
state: "on"
sequence:
- device_id: 318e6c3855b310c8162ca1c1e7625cb0
domain: climate
entity_id: climate.downstairs_heating_local
type: set_hvac_mode
hvac_mode: heat
- choose:
- conditions:
- condition: state
entity_id: input_boolean.upstairs_heating_tues
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
entity_id: climate.upstairs_heating_local
- choose:
- conditions:
- condition: state
entity_id: input_boolean.kitchen_ufh_tues
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
device_id:
- cbf47d57c0cc6ef49d19936c65d0e240
- conditions:
- condition: time
after: input_datetime.wed_t1
weekday:
- wed
sequence:
- choose:
- conditions: []
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.downstairs_heating_wed
state: "on"
sequence:
- device_id: 318e6c3855b310c8162ca1c1e7625cb0
domain: climate
entity_id: climate.downstairs_heating_local
type: set_hvac_mode
hvac_mode: heat
- choose:
- conditions:
- condition: state
entity_id: input_boolean.upstairs_heating_wed
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
entity_id: climate.upstairs_heating_local
- choose:
- conditions:
- condition: state
entity_id: input_boolean.kitchen_ufh_wed
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
device_id:
- cbf47d57c0cc6ef49d19936c65d0e240
- conditions:
- condition: time
after: input_datetime.wed_t3
weekday:
- wed
sequence:
- choose:
- conditions: []
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.downstairs_heating_wed
state: "on"
sequence:
- device_id: 318e6c3855b310c8162ca1c1e7625cb0
domain: climate
entity_id: climate.downstairs_heating_local
type: set_hvac_mode
hvac_mode: heat
- choose:
- conditions:
- condition: state
entity_id: input_boolean.upstairs_heating_wed
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
entity_id: climate.upstairs_heating_local
- choose:
- conditions:
- condition: state
entity_id: input_boolean.kitchen_ufh_wed
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
device_id:
- cbf47d57c0cc6ef49d19936c65d0e240
- conditions:
- condition: time
after: input_datetime.thur_t1
weekday:
- thu
sequence:
- choose:
- conditions: []
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.downstairs_heating_thurs
state: "on"
sequence:
- device_id: 318e6c3855b310c8162ca1c1e7625cb0
domain: climate
entity_id: climate.downstairs_heating_local
type: set_hvac_mode
hvac_mode: heat
- choose:
- conditions:
- condition: state
entity_id: input_boolean.upstairs_heating_thurs
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
entity_id: climate.upstairs_heating_local
- choose:
- conditions:
- condition: state
entity_id: input_boolean.kitchen_ufh_thurs
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
device_id:
- cbf47d57c0cc6ef49d19936c65d0e240
- conditions:
- condition: time
after: input_datetime.thur_t3
weekday:
- thu
sequence:
- choose:
- conditions: []
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.downstairs_heating_thurs
state: "on"
sequence:
- device_id: 318e6c3855b310c8162ca1c1e7625cb0
domain: climate
entity_id: climate.downstairs_heating_local
type: set_hvac_mode
hvac_mode: heat
- choose:
- conditions:
- condition: state
entity_id: input_boolean.upstairs_heating_thurs
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
entity_id: climate.upstairs_heating_local
- choose:
- conditions:
- condition: state
entity_id: input_boolean.kitchen_ufh_thurs
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
device_id:
- cbf47d57c0cc6ef49d19936c65d0e240
- conditions:
- condition: time
after: input_datetime.fri_t1
weekday:
- fri
sequence:
- choose:
- conditions: []
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.downstairs_heating_fri
state: "on"
sequence:
- device_id: 318e6c3855b310c8162ca1c1e7625cb0
domain: climate
entity_id: climate.downstairs_heating_local
type: set_hvac_mode
hvac_mode: heat
- choose:
- conditions:
- condition: state
entity_id: input_boolean.upstairs_heating_fri
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
entity_id: climate.upstairs_heating_local
- choose:
- conditions:
- condition: state
entity_id: input_boolean.kitchen_ufh_fri
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
device_id:
- cbf47d57c0cc6ef49d19936c65d0e240
- conditions:
- condition: time
after: input_datetime.fri_t3
weekday:
- fri
sequence:
- choose:
- conditions: []
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.downstairs_heating_fri
state: "on"
sequence:
- device_id: 318e6c3855b310c8162ca1c1e7625cb0
domain: climate
entity_id: climate.downstairs_heating_local
type: set_hvac_mode
hvac_mode: heat
- choose:
- conditions:
- condition: state
entity_id: input_boolean.upstairs_heating_fri
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
entity_id: climate.upstairs_heating_local
- choose:
- conditions:
- condition: state
entity_id: input_boolean.kitchen_ufh_fri
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
device_id:
- cbf47d57c0cc6ef49d19936c65d0e240
- conditions:
- condition: time
after: input_datetime.sat_t1
weekday:
- sat
sequence:
- choose:
- conditions: []
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.downstairs_heating_sat
state: "on"
sequence:
- device_id: 318e6c3855b310c8162ca1c1e7625cb0
domain: climate
entity_id: climate.downstairs_heating_local
type: set_hvac_mode
hvac_mode: heat
- choose:
- conditions:
- condition: state
entity_id: input_boolean.upstairs_heating_sat
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
entity_id: climate.upstairs_heating_local
- choose:
- conditions:
- condition: state
entity_id: input_boolean.kitchen_ufh_sat
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
device_id:
- cbf47d57c0cc6ef49d19936c65d0e240
- conditions:
- condition: time
after: input_datetime.sat_t3
weekday:
- sat
sequence:
- choose:
- conditions: []
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.downstairs_heating_sat
state: "on"
sequence:
- device_id: 318e6c3855b310c8162ca1c1e7625cb0
domain: climate
entity_id: climate.downstairs_heating_local
type: set_hvac_mode
hvac_mode: heat
- choose:
- conditions:
- condition: state
entity_id: input_boolean.upstairs_heating_sat
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
entity_id: climate.upstairs_heating_local
- choose:
- conditions:
- condition: state
entity_id: input_boolean.kitchen_ufh_sat
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
device_id:
- cbf47d57c0cc6ef49d19936c65d0e240
- conditions:
- condition: time
after: input_datetime.sun_t1
weekday:
- sun
sequence:
- choose:
- conditions: []
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.downstairs_heating_sun
state: "on"
sequence:
- device_id: 318e6c3855b310c8162ca1c1e7625cb0
domain: climate
entity_id: climate.downstairs_heating_local
type: set_hvac_mode
hvac_mode: heat
- choose:
- conditions:
- condition: state
entity_id: input_boolean.upstairs_heating_sun
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
entity_id: climate.upstairs_heating_local
- choose:
- conditions:
- condition: state
entity_id: input_boolean.kitchen_ufh_sun
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
device_id:
- cbf47d57c0cc6ef49d19936c65d0e240
- conditions:
- condition: time
after: input_datetime.sun_t3
weekday:
- sun
sequence:
- choose:
- conditions: []
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.downstairs_heating_sun
state: "on"
sequence:
- device_id: 318e6c3855b310c8162ca1c1e7625cb0
domain: climate
entity_id: climate.downstairs_heating_local
type: set_hvac_mode
hvac_mode: heat
- choose:
- conditions:
- condition: state
entity_id: input_boolean.upstairs_heating_sun
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
entity_id: climate.upstairs_heating_local
- choose:
- conditions:
- condition: state
entity_id: input_boolean.kitchen_ufh_sun
state: "on"
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
target:
device_id:
- cbf47d57c0cc6ef49d19936c65d0e240
trace:
stored_traces: 24
mode: single
Above the T3_mon timer has fired and on the left leg of the trace you see zones 1 is off and zones 2 & 3 are set to come on.