-
-
Notifications
You must be signed in to change notification settings - Fork 567
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add enum for standardized vacuum identifier names (#1732)
This adds an enum of "standardized" identifier names for vacuums to be used by downstreams like homeassistant, and converts viomivacuum integration to use them.
- Loading branch information
Showing
4 changed files
with
67 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from enum import Enum | ||
|
||
|
||
class StandardIdentifier(Enum): | ||
"""Base class for standardized descriptor identifiers.""" | ||
|
||
|
||
class VacuumId(StandardIdentifier): | ||
"""Vacuum-specific standardized descriptor identifiers. | ||
TODO: this is a temporary solution, and might be named to 'Vacuum' later on. | ||
""" | ||
|
||
# Actions | ||
Start = "vacuum:start-sweep" | ||
Stop = "vacuum:stop-sweeping" | ||
Pause = "vacuum:pause-sweeping" | ||
ReturnHome = "battery:start-charge" | ||
Locate = "identify:identify" | ||
|
||
# Settings | ||
FanSpeed = "vacuum:fan-speed" # TODO: invented name | ||
FanSpeedPreset = "vacuum:mode" | ||
|
||
# Sensors | ||
State = "vacuum:status" | ||
ErrorMessage = "vacuum:fault" | ||
Battery = "battery:level" |
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