Apart from setting heating and cooling according to the season I also tend to set my temperature differently. For example in summer I cool down to 23 but in winter I heat up to 19.
Initially I thought we could use sensor.season
But the start and end of autumn are different similarly for spring.
Ideally I would do something like summer plus minus one month then winter plus minus one month.
I use an input select to manually set the “heating season”.
Also using heating programs relative to sunrise and sunset minimizes the number of seasons.
2 Likes
jchh
(my username is my initials (and my first name isn't John))
3
I’ve thought about this as well. In theory, the number should never change but I am warmer or cooler (regardless of the thermostat) depending on the sun and the thermostat cannot take solar radiation into account.
I also used sensor.season for my lights as the speed at which sunset/dusk occurs is different throughout the year.
However, if you are looking for something else, you could always use {{now().month}} which will give the month number and so a greater resolution than sensor.season.
I have a convoluted set of schedules, input numbers, template sensors and two automations.
I tried using the season sensor. Season - Home Assistant But now just enable my two automations as needed. It’s different every year.
In spring and autumn-ish I enable the schedule automation which heats the house in the morning before I get up and in the evening if required.
In winter the heat pump stays on 24/7 and I enable another automation sets the temperature cooler based on me being away or in bed. It also slightly lowers the temperature during peak electricity rate times. It also boosts the temperature before I get up or home from work.
I was sceptical but it turns out that keeping everything in the house warm uses less energy than heating it up from cold every day. That coupled with the automatic temperature adjustments saved me a couple of hundred dollars last winter.
Summer they are both disabled and I just open all the windows and doors (they have insect screens) and let the air blow through. Only had to close everything up and manually run the air conditioner once last summer on a particularly hot and still night.
In what way are you using sunset times?
It affects my solar a lot but I don’t know how to deal with it
1 Like
jchh
(my username is my initials (and my first name isn't John))
7
I’m not sure where you read that but I only use sunset/rise for my lights not heating.
Currently I have a sensor that tells me the target temp and my automation is simple and triggered by this sensor (and a couple other things).
Schedule 1 is a a pre-get-up warming
Schedule 2 is active when house_mode ➜ awake (and before schedule 3’s time).
Schedule 3-5 is as you might expect
Schedule 6 is active when house_mode ➜ asleep (and before schedule 1’s time)
So, Influences include:
house mode
time of schedules
my presence
doors windows being open (not bathroom) > 1min
heating mode
boost function
morning bathroom heating
template sensor
template:
- sensor
- name: "Hive heating target temp"
unique_id: hive_heating_target_temp
device_class: temperature
unit_of_measurement: °C
availability: "{{ has_value('binary_sensor.hive_heating_doors_windows_open') }}"
attributes:
# influence shows (on dashboard) what is setting the temp
influence: >
{% set sched1 = states('input_boolean.hive_heating_1_scheduled') %}
{% set sched2 = states('input_boolean.hive_heating_2_scheduled') %}
{% set sched3 = states('input_boolean.hive_heating_3_scheduled') %}
{% set sched4 = states('input_boolean.hive_heating_4_scheduled') %}
{% set sched5 = states('input_boolean.hive_heating_5_scheduled') %}
{% set sched6 = states('input_boolean.hive_heating_6_scheduled') %}
{% set on1 = states('input_datetime.hive_heating_1')[:5] %}
{% set on3 = states('input_datetime.hive_heating_3')[:5] %}
{% set on4 = states('input_datetime.hive_heating_4')[:5] %}
{% set on5 = states('input_datetime.hive_heating_5')[:5] %}
{% set mode = states('input_select.hive_heating_target_mode') %}
{% set boost = states('timer.hive_heating_boost') %}
{% set bathroom = states('timer.hive_heating_boost_bathroom') %}
{% set dr_win = states('binary_sensor.hive_heating_doors_windows_open') %}
{% set home = states('zone.home') %}
{% set time = states('sensor.time') %}
{% set house = states('input_select.house_mode') %}
{% if mode == 'heat' %}
{% if boost == 'active' %} Boost
{% elif bathroom == 'active' %} Bathroom
{% elif dr_win == 'on' %} Dr/Win
{% elif home != '0' %}
{% if house == 'Awake' %}
{% if sched5 == 'on' and (time >= on5 or time < on1) %} Schedule 5
{% elif sched4 == 'on' and (time >= on4 or time < on1) %} Schedule 4
{% elif sched3 == 'on' and (time >= on3 or time < on1) %} Schedule 3
{% else %} Schedule 2
{% endif %}
{% elif sched1 == 'on' and ('12:00' > time >= on1) %} Schedule 1
{% else %} Schedule 6
{% endif %}
{% else %} Away
{% endif %}
{% else %} Off
{% endif %}
state: >
{% set influence = state_attr('sensor.hive_heating_target_temp','influence') %}
{% set temp1 = states('input_number.hive_heating_1_temp')|float %}
{% set temp2 = states('input_number.hive_heating_2_temp')|float %}
{% set temp3 = states('input_number.hive_heating_3_temp')|float %}
{% set temp4 = states('input_number.hive_heating_4_temp')|float %}
{% set temp5 = states('input_number.hive_heating_5_temp')|float %}
{% set temp6 = states('input_number.hive_heating_6_temp')|float %}
{% set open = states('input_number.hive_heating_open_temp')|float %}
{% set away = states('input_number.hive_heating_away_temp')|float %}
{% set boostpre = states('input_number.hive_heating_boost_prior_temp')|float %}
{% set boostby = states('input_number.hive_heating_boost_temp')|float %}
{% if influence == 'Boost' %} {{ boostpre + boostby }}
{% elif influence == 'Bathroom' %} {{ boostpre + 0.5 }}
{% elif influence == 'Dr/Win' %} {{ open }}
{% elif influence == 'Schedule 1' %} {{ temp1 }}
{% elif influence == 'Schedule 2' %} {{ temp2 }}
{% elif influence == 'Schedule 3' %} {{ temp3 }}
{% elif influence == 'Schedule 4' %} {{ temp4 }}
{% elif influence == 'Schedule 5' %} {{ temp5 }}
{% elif influence == 'Schedule 6' %} {{ temp6 }}
{% elif influence == 'Away' %} {{ away }}
{% elif influence == 'Off' %} 12
{% else %} 15
{% endif %}
state_class: measurement
icon: >
{% set influence = state_attr('sensor.hive_heating_target_temp','influence') %}
{% if influence == 'Boost' %} mdi:timer
{% elif influence == 'Bathroom' %} mdi:shower
{% elif influence == 'Dr/Win' %} mdi:door-open
{% elif influence == 'Schedule 1' %} mdi:calendar-check-outline
{% elif influence == 'Schedule 2' %} mdi:calendar-check-outline
{% elif influence == 'Schedule 3' %} mdi:calendar-check-outline
{% elif influence == 'Schedule 4' %} mdi:calendar-check-outline
{% elif influence == 'Schedule 5' %} mdi:calendar-check-outline
{% elif influence == 'Schedule 6' %} mdi:calendar-check-outline
{% elif influence == 'Away' %} mdi:car
{% elif influence == 'Off' %} mdi:power-off
{% else %} mdi:help
{% endif %}
…but not sunset (yet). It’s rock solid for me and survives restarts etc.
I am working on editing it to have an offset when the light (sensor.light_level) is low (or maybe when it is raining) but that is still very much in draft. Bringing the temp up ½ hr before sunset is a great idea and I might create a schedule for that as well.
If you like what I have done, I’ll happily share the update when I’m done.
For completeness, here is the automation (again, happy to share the whole package). I’m using MQTT but it’s easy enough to convert.
tap_action is not used and hold_action enables/disables that schedule. Clicking on the down-arrow reveals its settings to change them. I did it this way as it rarely changes and I wouldn’t change it by accident.