-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Enhance generic_thermostat with min/max run time and cooldown time #136298
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
base: dev
Are you sure you want to change the base?
Conversation
…meassistant-core into generic-thermostat-duty
…meassistant-core into generic-thermostat-duty
…meassistant-core into generic-thermostat-duty
…meassistant-core into generic-thermostat-duty
…checked only if both are provided
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the great work, would really like to see this merged! |
Its really weird because the generic_hygrostat's minimum cycle duration works differently. with the exact same name and description |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Will work on rebasing and also see about creating some tests (now that I know a bit about how to do that). |
Some tests are failing & new tests should possibly be created. Knowing now how to somewhat design and alter tests, I will work on resolving the failing tests and review the need for additional tests to test new features. |
If you need some help with the test, feel free to message me on Discord, I'm @emontnemery there too. |
Proposed change
The generic_thermostat has a minimum cycle duration that only reacts to temp change events and doesn't prevent the thermostat from being toggled without delay. The description provided with said setting is also misleading and doesn't convey that it is only effective for temp changes.
This change repurposes and enhances the minimum cycle duration setting (renamed to minimum run time) and introduces two new settings to the generic_thermostat. In all, the three main changes are that there is now a minimum run time, maximum run time, and a cooldown time setting.
The minimum run time setting ensures that once the generic_thermostat is on, it must stay on until at least the specified time has passed. The maximum run time setting does something similar and ensures that the thermostat cannot stay on for more than the configured time. Finally, the cooldown time setting ensures that the specified amount of time is passed in an off state before being turned on again.
The purpose to these settings is to introduce duty cycle type features to the generic_thermostat, as all sorts of devices could be attached to it that may require such control (to ensure safety and lifespan of the devices).
Finally, these changes are backwards compatible - it will automatically migrate an existing minimum cycle duration setting to the new minimum run time and cooldown time (effectively providing the exact same functionality). As well, these settings only affect the generic_thermostat control itself for changing state between on and off; it does not prevent the attached switch device from being manually controlled if required.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
Will create a documentation PR once this code PR is reviewed and ready to be accepted. Documentation changes made in https://github.com/esand/home-assistant.io/tree/generic-thermostat-duty
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: