#I would try the automations channel and
1 messages ยท Page 1 of 1 (latest)
I actually posted this on the forum asking how it could be done easier a while ago and didn't get any reply. What do you mean by 'helpers that aren't really helping'?
You have 3 schedules and an input_select, and a multitude of triggers.
It's midnight here, and 1am for many folks in this server, but try posting again ๐
I need to go to sleep too :), I'm one of those for who it is 1 AM. But I do want the three schedules and the input_select actually. How else is HA supposed to know what to do and when?
The 3 schedules may be fine, same with the input select. But right now trying to read that automation, it seems like you're cramming a lot into one automation. What you might be better off doing is creating a single template binary sensor that is on when the heating should be on, and off when the heating should be off, based on which schedule is selected.
template:
- binary_sensor:
- name: "Heating On"
unique_id: heating_on
state: >
{{ states(states('input_select.welk_schema')) | default(states('schedule.verwarmingsschema_kids')) }}
Then whenever that sensor turns on, turn on the heating, when it turns off, turn off the heating ๐
This is untested, but my brain says it ought to work
How does that template under 'state' work? I like the idea of the sensor. You are using
states(states('input_select.welk_schema))
, which I think is not going to work. The state of 'input_select.wel_schema' is a string which is a friendly name and not an entity ID.
That was kind of the whole problem I came here for. I am trying to find a way to translate those strings to entity_ids without making the strings unreadable for my housemates ๐
Well then you go back to your if statement from before
Assuming options are 'Schedule 1','Schedule 2','Schedule 3'
{% set schedule = states('input_select.welk_schema') %}
{% if schedule == 'Schedule 1' %}
{{ states('schedule.verwarmingsschema_kids') }}
{% elif schedule == 'Schedule 2' %}
...
You get the idea from there
{{ states('schedule.verwarmingsschema_kids') }} will output on or off depending on if the schedule has a time covering now.
And I can just put that whole thing under the 'state' entry in the template sensor part?
Yup, though you'll need to re-indent it like my previous example
Sure, I got that far by now. Thanks a lot for all the help!!
The beauty of the template sensor is it will update automatically when any of the schedules change, or when the input select changes. And then voilร , a single entity will turn your heating on and off
Next step: checking people are actually at home during those times before turning the heating on ๐
I know how to check that my phone is at home. I am not my phone though.... And my kids certainly aren't. For now, this will do for me.
You can also use motion sensors to check if any room has seen motion, and template sensors can stay "on" for a longer duration if that makes it easier ๐
But as it is, I think you're probably a lot closer to a solution now that you were a while ago ๐
That's for sure! I actually had a solution that worked but it had a 'choose' with 15 options going through all combinations of the selector and schedules. This will be so much nicer!