-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publisch next scheduler action to HA #170
Comments
The |
Hi Niels, |
I got a bit further. I managed to get the next action time in a template sensor. So question left is: can I deduce the action corresponding to this trigger ? |
Hi Niels, I fear I am stuck again. I believe it is not possible to relate actions to the time slots. In my case I have three Times: 0h 5h00 and 21h00, but since I switch temperature from 19 to 21 and back to 19 degrees, I only see 2 actions, (I see 3 actions when the evening time slot has a different temperature.) But is it guaranteed that the actions are in the slot order? So coming back to your question: |
Amazingly, I started trying to create a display for my home-made thermostat this weekend (TYVM for enabling that project via this component BTW), eventually got to the part where I wanted to display the "Next temperature target", and stumbled into this exact problem. I can't tell which "action" corresponds to the next "slot" from the
Is 100% what i'm looking for yes. Would it be possible? |
I don't know Python, and I don't know how to write a Home Assistant integration. But I was reading through your source anyway. Seams the data we want is in the I'm sure i'm missing loads of complexity, like "is it really the next action if the condition is not met when the timer expires", but i'm not sure how to solve that right now. Maybe make it clear that the "next" action might not happen, but calling the property "next_scheduled_action" or "potential_next_action" or something. |
Hi Niels, Peely, I managed to get to the info wanted by, and make the 'actions' attribute to return the 'all_actions' structure. At this time it seems the action list ordering complies with the time slot ordering, and next_slot can be used as an index in 'all_actions' list to get what we need:
.....
template:
So Niels, it would be nice if you would consider adding the 'all_actions' property in next release. |
Hi Niels, Peely, Ronny, Thank You All |
I confess to didn't read the thread here. I wanted the current scheduler action, so i just read "next scheduler action" and thought – no.
That would be perfect! |
I am proposing the following changes:
Note that the @RonnyDeLoor @peely @paul-at-pebbletech @florianec please put a thumbs-up on this message if you're happy with this proposal, otherwise please share your counterproposal. |
Yes happy with the proposal but it would be nice to get a field that has the timeslots and the actions in a comma delimited string. That could then be consumed by a device. The reason I have adopted HA & ESPhome is mantra of driving automation to the edge. EG not relying on high order capabilities such as cloud compute and even HA, such as being able to get the sensor devices to operate when HA is not available. This would aid this approach, but if it is a stretch to far I can use a python script to achieve it. @nielsfaber Do you want me to raise a separate request for such a capability as it beyond the initial usecase in this issue? |
@paul-at-pebbletech If you want to go crazy, you should consider using websocket API. This is how scheduler card communicates with the component as well. The state attributes will never give you the full configuration (e.g. conditions are not displayed). With websocket API this is much more flexible (and you can also interact with scheduler). |
Ok I respect your view. But I think I will stick with the python script approach as its one less technical head to deal with. Hopefully :-) |
Hi Niels, I am perfectly happy with your proposed change. |
Release v3.2.7 of scheduler-component contains these changes. |
Thank you very much @nielsfaber works great |
Checklist
Proposal
I really like the scheduler component and now mainly use it to set schedules for my home thermostats. In times of high energy prices I would like to make my (custom) thermostat code more intelligent.
By intelligent I do not mean 'app' access, but a real intelligent home heating algorithm. My current system is already taking the outside weather temp in consideration to set the boiler temperature (floor heating). My next step is to predict when the heating really should start depending on the time I would like to have a certain temperature in the house (set by the scheduler card/component) and the temperature difference between the room and external temperature. Especially for floor heating this is really important, since there is a big delay (several hours) between switching on the system and reaching the desired temperature.
So I would like you to consider to make the next action (as can be seen in the live view) available in something like a text sensor. So we can access this info from HA code and decide at what appropriate time we should take action to be 'ready' in time.
The text was updated successfully, but these errors were encountered: