I am new to HAss and has a lot to learn. So I read a lot here and try to copy what other people shared.
But something I cannot figure out myself and the information is to fragmented for me.
This is my situation:
I have a thermostat Horsmann ST321 and a boiler switch, also Horsmann.
In lovelace I have a thermostat card that functions but I am stuck on automation.
I want this:
Mon, Tue, Wed, Thu, Fri I want from 08:30 to 16:30 a temperature of 18 deg. Celcius and from 16:30 to 22:30 I want 20 deg. Celsius.
Sat, Sun (and maybe Dutch holidays) I want from 08:30 to 22:30 20 deg. Celsius.
Every night from 23:00 to 08:30 I want 15 deg. Celsius.
Thank you very much, I will have a look and try to make something out of it. I was giving all the details to describe my situation so one could give me help in the right direction, thats all. It was not a question for you writing my code.
I too do not have doors fully implemented but I do have a place holder for it.
## resets temperature following any pattern change
sc_heat_reset_value:
alias: Heating Reset Value
sequence:
- service: input_number.set_value
data_template:
entity_id: input_number.in_heat_temp_control_val
value: >
{% if false and not is_state('binary_sensor.bs_door_open', 'on') %}
{{ '6' | float }}
{% elif not is_state('binary_sensor.bs_occupied', 'on') %}
{{ states('input_number.in_heat_temp_away_val') | float }}
{% elif is_state('binary_sensor.bs_heat_night_active', 'on') %}
{{ states('input_number.in_heat_temp_night_val') | float }}
{% elif is_state('binary_sensor.bs_heat_day_active', 'on') %}
{{ states('input_number.in_heat_temp_day_val') | float }}
{% else %}
{{ states('input_number.in_heat_temp_evening_val') | float }}
{% endif %}
#### end of template
This runs at any pattern change and sets the value in an input number
That change triggers another automation to update the value in my (HA Software) thermostat
I use the ‘thermostat’ in the field to just provide me a temperature reading into the HA thermostat too and it’s output drives the boiler
# set temperature weekends and holidays daytime
- id: '201912151035'
alias: Conditional control thermostat weekend and holiday
description: ''
trigger:
- platform: time
from: '08:30:00'
to: '22:30:00'
condition:
condition: state
entity_id: 'binary_sensor.workday_sensor'
state: 'off'
action:
- service: climate.set_temperature
data:
entidy_id: 'sensor.horstmann_secure_meters_hrt4_zw_thermostat_transmitter_temperature'
temperature: '20'
# set temperature all days night
- id: '201912151135'
alias: Conditional control thermostat weekend and holiday
description: ''
trigger:
- platform: time
from: '23:30:00'
to: '08:30:00'
action:
- service: climate.set_temperature
data:
entidy_id: 'sensor.horstmann_secure_meters_hrt4_zw_thermostat_transmitter_temperature'
temperature: '15'
# set temperature workday between 08:30 and 16:30
- id: '201912151035'
alias: Conditional control thermostat weekend and holiday
description: ''
trigger:
- platform: time
from: '08:30:00'
to: '16:30:00'
condition:
condition: state
entity_id: 'binary_sensor.workday_sensor'
state: 'on'
action:
- service: climate.set_temperature
data:
entidy_id: 'sensor.horstmann_secure_meters_hrt4_zw_thermostat_transmitter_temperature'
temperature: '18'
# set temperature workday between 16:30 and 22:30
- id: '201912151035'
alias: Conditional control thermostat weekend and holiday
description: ''
trigger:
- platform: time
from: '16:30:00'
to: '22:30:00'
condition:
condition: state
entity_id: 'binary_sensor.workday_sensor'
state: 'on'
action:
- service: climate.set_temperature
data:
entidy_id: 'sensor.horstmann_secure_meters_hrt4_zw_thermostat_transmitter_temperature'
temperature: '20'
I would change the alias for the different automations to something more meaningful. Otherwise I think the automations look alright. in addition I think it would be a good idea to create input_datetimes for the different time triggers, so that you are able to control the times over the UI.
I could help you combine these four automations into one automation, if you like.
Thanks for looking at my efforts. I thought the id had to be something abstract because I made the others I have with Lovelace and they have some cryptical number. I would appriciate it when you would help me improve this. So I can learn about this but others also may have a good example.
This afternoon at 16:30 I hoped to see the thermostat change to 20 deg. Celsius but it didn’t. I got the error message:
Error while executing automation automation.conditional_control_thermostat_workday_16_30. Invalid data for call_service at pos 1: extra keys not allowed @ data['entidy_id']
Do you know maybe what is wrong because I don’t know.
Thanks in advance.
You have the same typo in other places as well. Sorry didn’t catch these ones. Why don’t you change the time condition for the different automations to test wheter they work or not?
I did copy/paste so the error was suddenly everywhere. But I corrected that.
I just tried your suggestion and I got no errors anymore…BUT… the temperature is not changing.
The indentation is wrong at the end. Also you are using the sensor to set the temperatur, but you need to use the climate.xxx entity. Try the below which worked for me.
I’m not sure on this but is setting the temperature enough? If the heating is turned off, will it turn on if you set a temperature? I don’t own a thermostat so I can’t find out.
You are absolute right and it works. I will wait till I have seen a cycle of 24 hours and then I will report back to you.
For now I will qualify my question as solved by you. Thank you so very much.