Add support for "Valve" device type #286
Open
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.
For issue #239
Not sure if this project is active anymore. Looks like no releases in over a year now?
I am not sure the what best implementation of this device is. Valve would make a lot more sense to me as a sub-class of Cover, as it shares most of the commands/states/features. But HA isn't about consistency, so here we are. Instead of having a dedicated position topic (like Cover), the Valve sends two different types of commands. Commands are strings for standard valves, but numeric for positional valves. Also, publishing is strings for standard, but either numeric or JSON for positions. I have tried to cover all of these use cases. There is also a STOP command (but no STOP state)... but it has to be explicitly enabled, and I have no idea under what conditions HA would actually send it.
I am running a live device on the standard valve implementation, and a test device for the positional setup. Both are ESP8266. I have added a few test cases to support the different position cases.
Finally, also not sure how to handle the generated documentation. There seems to be a mismatch between the current pip requirements (sphinx=5.0.2) and the actual docs committed to the repo (sphinx=4.5.0). So if I run the generate command, it updates 95% of the doc files. This PR is done without any doc changes, or I can use a branch that has all the changes.