-
-
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
Add ability to lock to set mode #5924
Conversation
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.
This would be better to change change_every
to allow never
similar to update_interval
s do
I like that proposal, but I'm not sure how to implement that. The Ideally |
You can use something like |
Thanks for the insight, I've changed |
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.
LGTM
What does this implement/fix?
It allows locking the read out of the HLW8012 component to a single mode (e.g current or voltage). This is useful when you're not interested in one of the two values and want to continuously read back the other.
This allows the
change_mode_every
parameter to be set to"never"
which locks the mode to the setinitial_mode
.Types of changes
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#3473
Test Environment
Example entry for
config.yaml
:With the below config the
mode
will be locked toVOLTAGE
.Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: