Skip to content
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

Added support for 527K #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libdyson/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
DEVICE_TYPE_PURE_COOL_LINK_DESK,
DEVICE_TYPE_PURE_HOT_COOL,
DEVICE_TYPE_PURE_HOT_COOL_NEW,
DEVICE_TYPE_PURE_HOT_COOL_527K,
DEVICE_TYPE_PURE_HOT_COOL_LINK,
DEVICE_TYPE_PURE_HUMIDIFY_COOL,
DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL_FORMALDEHYDE,
Expand Down Expand Up @@ -61,6 +62,7 @@ def get_device(serial: str, credential: str, device_type: str) -> Optional[Dyson
if device_type in [
DEVICE_TYPE_PURE_HOT_COOL,
DEVICE_TYPE_PURE_HOT_COOL_NEW,
DEVICE_TYPE_PURE_HOT_COOL_527K,
]:
return DysonPureHotCool(serial, credential, device_type)
if device_type == DEVICE_TYPE_PURE_HUMIDIFY_COOL:
Expand Down
2 changes: 2 additions & 0 deletions libdyson/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
DEVICE_TYPE_PURE_HOT_COOL_LINK = "455"
DEVICE_TYPE_PURE_HOT_COOL = "527"
DEVICE_TYPE_PURE_HOT_COOL_NEW = "527E"
DEVICE_TYPE_PURE_HOT_COOL_527K = "527K"

DEVICE_TYPE_NAMES = {
DEVICE_TYPE_360_EYE: "360 Eye robot vacuum",
Expand All @@ -24,6 +25,7 @@
DEVICE_TYPE_PURE_COOL_LINK_DESK: "Pure Cool Link Desk",
DEVICE_TYPE_PURE_HOT_COOL: "Pure Hot+Cool",
DEVICE_TYPE_PURE_HOT_COOL_NEW: "Pure Hot+Cool (New)",
DEVICE_TYPE_PURE_HOT_COOL_527K: "Pure Hot+Cool (527K)",
DEVICE_TYPE_PURE_HOT_COOL_LINK: "Pure Hot+Cool Link",
DEVICE_TYPE_PURE_HUMIDIFY_COOL: "Pure Humidify+Cool",
DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL_FORMALDEHYDE: "Purifier Humidify+Cool Formaldehyde",
Expand Down
2 changes: 2 additions & 0 deletions tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
DEVICE_TYPE_PURE_COOL_LINK_DESK,
DEVICE_TYPE_PURE_HOT_COOL,
DEVICE_TYPE_PURE_HOT_COOL_NEW,
DEVICE_TYPE_PURE_HOT_COOL_527K,
DEVICE_TYPE_PURE_HOT_COOL_LINK,
DEVICE_TYPE_PURE_HUMIDIFY_COOL,
DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL_FORMALDEHYDE,
Expand Down Expand Up @@ -45,6 +46,7 @@
(DEVICE_TYPE_PURE_HOT_COOL_LINK, DysonPureHotCoolLink),
(DEVICE_TYPE_PURE_HOT_COOL, DysonPureHotCool),
(DEVICE_TYPE_PURE_HOT_COOL_NEW, DysonPureHotCool),
(DEVICE_TYPE_PURE_HOT_COOL_527K, DysonPureHotCool),
(DEVICE_TYPE_PURE_HUMIDIFY_COOL, DysonPureHumidifyCool),
(DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL_FORMALDEHYDE, DysonPurifierHumidifyCoolFormaldehyde),
],
Expand Down