-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose device_type property on switches (#49)
* Expose device_type property on switches * Clarify duplicate device type Source of information: myStrom support
- Loading branch information
Showing
5 changed files
with
51 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
## next release | ||
|
||
- None changes | ||
- Expose `device_type` property on switches | ||
|
||
## 2.2.0 (2023-05-21) | ||
|
||
|
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,33 @@ | ||
""" | ||
Device types. | ||
See https://api.mystrom.ch/#f37a4be7-0233-4d93-915e-c6f92656f129 | ||
""" | ||
|
||
DEVICE_MAPPING_NUMERIC = { | ||
101: "Switch CH v1", | ||
102: "Bulb", | ||
103: "Button+", | ||
104: "Button", | ||
105: "LED Strip", | ||
106: "Switch CH v2", | ||
107: "Switch EU", | ||
110: "Motion Sensor", | ||
113: "modulo® STECCO / CUBO", | ||
118: "Button Plus 2nd", | ||
120: "Switch Zero", | ||
} | ||
|
||
DEVICE_MAPPING_LITERAL = { | ||
"WSW": DEVICE_MAPPING_NUMERIC[101], | ||
"WRB": DEVICE_MAPPING_NUMERIC[102], | ||
"WBP": DEVICE_MAPPING_NUMERIC[103], | ||
"WBS": DEVICE_MAPPING_NUMERIC[104], | ||
"WRS": DEVICE_MAPPING_NUMERIC[105], | ||
"WS2": DEVICE_MAPPING_NUMERIC[106], | ||
"WSE": DEVICE_MAPPING_NUMERIC[107], | ||
"WMS": DEVICE_MAPPING_NUMERIC[110], | ||
"WLL": DEVICE_MAPPING_NUMERIC[113], | ||
"BP2": DEVICE_MAPPING_NUMERIC[118], | ||
"LCS": DEVICE_MAPPING_NUMERIC[120], | ||
} |
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