I’m looking for some inspiration on how to set up a schedule to control my thermostats with different settings for weekdays and weekends.
Currently I have created three input sliders for each thermostat to preset target temperatures for day, evening and night.
I have automations for “day”, “evening”, “night” that are triggered at specific times of day.
They read the slider values and set the corresponding target temperature for the thermostat.
Now I’m a little out of ideas how to elegantly add the weekday/weekend differentiation.
I could duplicate this whole set up to have a second set of sliders/automations for weekends, but I’m hoping for a better way…
Also, it would be cool to have a “switch” to override the setting - i.e. to switch to “weekend”-mode on bank holidays and to “weekday”-mode when I’m away for a day on a weekend.
What I’m missing is a way to select different actions within an automation, depending on some variable or component’s state.
Speaking of “modes”: the climate control has a set_away_mode service and a set_swing_mode service.
What are those for?
you could make 1 set of sliders which gives the difference you want.
for example in the week you want durng the day 18 degrees, in the weekend you want it 22 degrees during the day.
you could then make the weekend switch on +4.
in the automations you could set different hours for weekend days.
if you make a switch for “like weekdays” then you can put in the automation for weekdays the condition “if switch is on” and in the weekendautomation you put “if switch is off”
i would advice you to read about appdaemon https://github.com/acockburn/appdaemon if you know a bit off python.
it would make youre automations a lot more flexible.
Thanks for your reply!
A static addition to the slider value for weekends would be one solution, but I’d like to have the sliders reflect the actual target temperature.
But, utilizing a “weekend switch” (input_boolean), I could update the slider values when the switch is put into “weekend mode”.
Good idea, thanks!
I’ll have a look at AppDaemon. I had a quick glance at the github page, but I still have no clue what it does.
I see it comes with a tutorial - that should clarify things.
Do you care to share your yaml code for this automation? This sounds exactly like what I want to implement, but I’m a bit unsure about how to set it up
With this you can switch on weekend mode even on a weekday, e.g. if you’re working from home.
It only switches back automatically in the night from Sunday to Monday.
I have another automation that sends me a message when Weekend Mode is active during a weekday, so I don’t accidentally leave it on.
But where do you set the target temps for the different rooms e.g. during the day? I’m thinking about lowering the temp to e.g. 17 between 7AM and 4PM, and then resetting the target temp in each room to whatever the target temp was before 7AM
The “initial” value specifies the default (but that’s also taking care of by appdaemon and the switch_reset app).
Additionally I have automations for day/evening/night that get triggered when the sliders are moved or when it’s “their time” to activate:
alias: 'Heating: Evening'
hide_entity: 'True'
trigger:
- platform: time
hours: 16
minutes: 00
seconds: 00
- platform: state
entity_id: input_slider.heating_livingroom_evening
- platform: state
entity_id: input_slider.heating_bedroom_evening
- platform: state
entity_id: input_slider.heating_office_evening
- platform: state
entity_id: input_slider.heating_bathroom_evening
- platform: state
entity_id: input_slider.heating_kitchen_evening
- platform: state
entity_id: input_boolean.venting
state: 'off'
- platform: state
entity_id: input_select.housemode
state: 'Evening'
condition:
- condition: and
conditions:
- condition: or
conditions:
- condition: template
value_template: '{{ 16 <= now().hour < 21 }}'
- condition: state
entity_id: input_select.housemode
state: 'Evening'
# don't switch modes while ventingmode is 'on'
- condition: state
entity_id: input_boolean.venting
state: 'off'
action:
- service: climate.set_temperature
data_template:
entity_id: climate.danfoss_z_thermostat_014g0013_heating_1_6_1
temperature: '{{ states.input_slider.heating_kitchen_evening.state }}'
[... repeat for all rooms ...]
- condition: and
conditions:
- condition: template
value_template: '{{ trigger.platform == "time" }}'
- condition: state
entity_id: input_select.housemode
state: 'Evening'
- service: input_select.select_option
data:
entity_id: input_select.housemode
option: 'auto'
The bottom part with the conditions inside the action clause is to reset the house mode to “auto” when it was manually overridden. E.g. when I get home from work early and set the house mode to “Evening” although it’s just afternoon, the house mode will return to “auto” when the time for “Evening” is reached.
That way I don’t have the heating running all night, because I forgot to remove the house mode override (i.e. setting it back to “auto”).
Currently I don’t have my config shared anywhere.
I’ll put it on github if that would help - I’d need to remove any sensitive information first, though, so give me a day or so…
I’ve also been thinking about writing a few explanatory lines and add some screenshots, but I haven’t gotten around to it yet.
On top of everything that has already been said, you should consider the workday sensor, it’s a standard component in HA.
This is a binary sensor for workday or not. You can put in your location (country, state, province) and it automatically determines if it is a weekend, bank holiday etc
I’m also looking for some insight or examples to thermostat programming. I have a z-wave thermostat set up and a simple schedule to set the temperature.
The behavior I’m looking for is:
I want to have a predefined set of target conditions (temperature, heat/cool, fan mode) based on day of week and time of day. If there is no other input, these conditions are set.
If the setpoint (or any other parameter, such as the fan mode) is changed either at the physical thermostat or via the HA web interface, I want that condition to time out in a given time (e.g. 3 hours).
I’ve implemented a simple version that covers behavior 1. But not sure the best way to do behavior 2.
Input or advice appreciated!!