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
Add option to heat_control component to set min cycle duration #2726
Conversation
This commit adds documentation for the heat_control min_cycle_duration option added in home-assistant/core#2726
| current_state = STATE_ON | ||
| else: | ||
| current_state = STATE_OFF | ||
| long_enough = condition.state(self.hass, self.heater_entity_id, |
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.
Shouldn't we be able to just return when not long_enough ?
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.
Yep, that should work. I'll respin this right now
|
Looks good. One minor comment but then it's ready to go. |
This commit adds a new config option to the heat_control thermostat component, min_cycle_duration. Some heaters and/or ACs don't like being constantly cycled on and off. Prior to this patch the heat_control component can end up cycling the switch quite frequently. (depending on how quickly the temperature changes) The new option added is used for setting a minimum duration that must have elapsed in either the on or off state before the thermostat will send the service call to cycle the switch. This should enable users to hand tune how frequently heat_control can switch the device on or off to best suit the device being used.
1e13e5f
to
496972a
Compare
|
The latest revision just updated the logic to return if not long_enough instead of adding it to all the checks later. |
|
This would be a very welcome pull for heaters as well, had mine toggling on and off in a loop every few minutes yesterday. |
This commit adds documentation for the heat_control min_cycle_duration option added in home-assistant/core#2726
Description:
This commit adds a new config option min_cycle_duration which when specified will add a minimum duration that the thermostat must keep the switch in each state prior to switching it either off or on. The motivation is primarily for AC mode, because window and in-wall AC units are not nearly as efficient during the first few minutes of operation. This gives users a tunable to fine tune exactly how frequently heat control can power cycle their devices.
Related issue (if applicable): fixes #
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#733
Example entry for
configuration.yaml(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed:
If code communicates with devices, web services, or a:
toxrun successfully. Your PR cannot be merged unless tests passREQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.If the code does not interact with devices:
toxrun successfully. Your PR cannot be merged unless tests passThis commit adds a new config option to the heat_control thermostat
component, min_cycle_duration. Some heaters and/or ACs don't like
being constantly cycled on and off. Prior to this patch the
heat_control component can end up cycling the switch quite
frequently. (depending on how quickly the temperature changes) The
new option added is used for setting a minimum duration that must
have elapsed in either the on or off state before the thermostat will
send the service call to cycle the switch. This should enable users to
hand tune how frequently heat_control can switch the device on or off
to best suit the device being used.