-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
Enhance generic_thermostat with min/max run time and cooldown time. #136298
Open
esand
wants to merge
19
commits into
home-assistant:dev
Choose a base branch
from
esand:generic-thermostat-duty
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+188
−38
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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.
home-assistant
bot
added
cla-needed
integration: generic_thermostat
new-feature
Quality Scale: No score
cla-recheck
cla-signed
and removed
cla-recheck
cla-needed
labels
Jan 23, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
These changes 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: