-
-
Notifications
You must be signed in to change notification settings - Fork 568
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add fan_speed_presets() for querying available fan speeds (#643)
* Add fan_speed_presets() for querying available fan speeds This returns a dictionary {name, value} of the available fan speeds, the main driver being the need to simplify homeassistant integrations for different devices. For viomi vacuums this is currently straightforward and hard-coded, but we do special handling for rockrobo devices (based on info() responses): * If the query succeeds, newer firmware versions (3.5.7+) of v1 are handled as a special case, otherwise the new-style [100-105] mapping is returned. * If the query fails, we fall back to rockrobo v1's percentage-based mapping. This happens, e.g., when the vacuum has no cloud connectivity. Related to #523 Related downstream issues home-assistant/core#32821 home-assistant/core#31268 home-assistant/core#27268 * Fix method naming.. * small pre-merge cleanups
- Loading branch information
Showing
2 changed files
with
69 additions
and
5 deletions.
There are no files selected for viewing
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
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