Skip to content

Commit

Permalink
Adds initial support for 358K (treating as non-formaldehyde) (#8)
Browse files Browse the repository at this point in the history
* Adds initial support for 358K (treating as non-formaldehyde)
* Patch version bump for new release
  • Loading branch information
dotvezz authored Apr 11, 2023
1 parent 6e49741 commit 41e9078
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.10.1 (2023-04-10)

- Add support for Purifier Humidify+Cool (358K) ([@dotvezz](https://github.com/dotvezz))

## v0.10.0 (2023-04-10)

- Fix dyson API login issues ([@dotvezz](https://github.com/dotvezz))
Expand Down
6 changes: 5 additions & 1 deletion libdyson/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
DEVICE_TYPE_PURE_HOT_COOL_NEW,
DEVICE_TYPE_PURE_HOT_COOL_LINK,
DEVICE_TYPE_PURE_HUMIDIFY_COOL,
DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL,
DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL_FORMALDEHYDE,
DEVICE_TYPE_PURIFIER_HOT_COOL,
)
Expand Down Expand Up @@ -67,7 +68,10 @@ def get_device(serial: str, credential: str, device_type: str) -> Optional[Dyson
DEVICE_TYPE_PURIFIER_HOT_COOL,
]:
return DysonPureHotCool(serial, credential, device_type)
if device_type == DEVICE_TYPE_PURE_HUMIDIFY_COOL:
if device_type in [
DEVICE_TYPE_PURE_HUMIDIFY_COOL,
DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL
]:
return DysonPureHumidifyCool(serial, credential, device_type)
if device_type == DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL_FORMALDEHYDE:
return DysonPurifierHumidifyCoolFormaldehyde(serial, credential, device_type)
Expand Down
2 changes: 2 additions & 0 deletions libdyson/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
DEVICE_TYPE_PURE_COOL_FORMALDEHYDE = "438E"
DEVICE_TYPE_PURE_COOL_DESK = "520"
DEVICE_TYPE_PURE_HUMIDIFY_COOL = "358"
DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL = "358"
DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL_FORMALDEHYDE = "358E"
DEVICE_TYPE_PURE_HOT_COOL_LINK = "455"
DEVICE_TYPE_PURE_HOT_COOL = "527"
Expand All @@ -29,6 +30,7 @@
DEVICE_TYPE_PURE_HOT_COOL_NEW: "Pure Hot+Cool (New)",
DEVICE_TYPE_PURE_HOT_COOL_LINK: "Pure Hot+Cool Link",
DEVICE_TYPE_PURE_HUMIDIFY_COOL: "Pure Humidify+Cool",
DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL: "Purifier Humidify+Cool",
DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL_FORMALDEHYDE: "Purifier Humidify+Cool Formaldehyde",
DEVICE_TYPE_PURIFIER_HOT_COOL: "Purifier Hot+Cool",
}
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = libdyson-neon
version = 0.10.0
version = gitg0.10.1
author = The libdyson Working Group
author_email = [email protected]
license = MIT License
Expand Down
2 changes: 2 additions & 0 deletions tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
DEVICE_TYPE_PURE_HOT_COOL_NEW,
DEVICE_TYPE_PURE_HOT_COOL_LINK,
DEVICE_TYPE_PURE_HUMIDIFY_COOL,
DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL,
DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL_FORMALDEHYDE,
DEVICE_TYPE_PURIFIER_HOT_COOL,
Dyson360Eye,
Expand Down Expand Up @@ -47,6 +48,7 @@
(DEVICE_TYPE_PURE_HOT_COOL, DysonPureHotCool),
(DEVICE_TYPE_PURE_HOT_COOL_NEW, DysonPureHotCool),
(DEVICE_TYPE_PURE_HUMIDIFY_COOL, DysonPureHumidifyCool),
(DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL, DysonPureHumidifyCool),
(DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL_FORMALDEHYDE, DysonPurifierHumidifyCoolFormaldehyde),
(DEVICE_TYPE_PURIFIER_HOT_COOL, DysonPureHotCool),
],
Expand Down

0 comments on commit 41e9078

Please sign in to comment.