-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Make hvacThermostat weekly_schedule more user friendly #5535
Conversation
@Koenkk actually hold off with merging, I've been reading some more in the ZCL and seems dayOfWeek is a bitmask
But I don't have more time today |
Alright, I got it all fixed and retested. The following now works:
This sets a different schedule for weekdays and for the weekend on my TRV. You can also do something like:
I could not test the above as all my thermostats/trv's are heating only. But the mode field gets correctly set according to the ZCL. |
Once this gets merged, I think we should add a 'generic' page somewhere on zigbee2mqtt.io about how to write a thermostat schedule payload. |
@sjorge preferably an expose is added such that this can be configured from the frontend. An example can be found here: zigbee-herdsman-converters/devices/xiaomi.js Line 3073 in 2b871e6
|
That one does not look to match the hvac one at all. Although this commits should make it easier to add something. However you can execute it multiple times and it does partial updates on the device as described in the ZCL. If this turns out to be complex, i still think this is a big improvement even without an exposes value. But I will see if I can add something. |
This can already be merged indeed, thanks! |
Took a while to figure out how this works, did I miss a piece of documentation somewhere?
I also made it more user friendly, before you had to write this:
Now you can also (this is backwards compatible) write:
Which to me is a lot more readable and easier, no more doing minutes since 00:00 calculations for transitionTime, no more wondering if sunday is 0 or 7 for dayofweek, ...