-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Mqtt topics to support numeric fan speed #1859
Conversation
Any plans on adding this one to the next release or is there something missing? |
I think the biggest "issue" here is that this PR contains two (unrelated) changes. The numeric fan speed control is fairly straightforward and uncontroversial, but there's also the dump_config changes which are more fundamental and require more review, delaying the whole PR. So in the future I'd advise to split such changes into two PRs :) W.r.t. the dump_config change, we usually abstract this the other way around: introduce a |
Hey there @glmnet, mind taking a look at this pull request as it has been labeled with an integration ( |
Hey there @esphome/core, mind taking a look at this pull request as it has been labeled with an integration ( |
Thank you for your feedback. I agree that I have derived from the standard call_... pattern. And I do not want to introduce a "call_dump_config" method with this PR. However, I still remember that I was chasing a problem for 1h, because my component was implicitly internal (id but no name). So I would like to prevent other users from such a problem. I made a small change to dump_config only. I hope that is okay for you. :-) |
#2325 added the |
What does this implement/fix?
Allows to set and query the exact (numeric) fan speed via two new MQTT topics.
Types of changes
Related issue or feature (if applicable): fixes setting fan speed as a percentage value #1015
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#1214
Test Environment
Example entry for
config.yaml
:Explain your changes
For fan speed there are already two topics (state & command) which support the three options LOW, MEDIUM, HIGH, but no numeric values. I have added two more topics called "speed_level" that support numeric values in the from 0 to the configured speed count. Since the old topics still exist, this change is backward compatible.
I also implemented the dump_config method of the MQTT fan component. And I made a generic change to configuration logging of MQTT components: If the base component is internal and hence the MQTT component stays inactive this indicated in the log. (I spent about 1h to find out what was going on to discover that my fan was implicitly internal because it had an id but no name. I would like to make that easier to discover for other people. ;-))
Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: