From 5794d72f644bfc4e3826a28a69a6a59a746a7b2e Mon Sep 17 00:00:00 2001 From: Ben Vezzani Date: Tue, 6 Dec 2022 12:08:09 -0500 Subject: [PATCH 1/2] Add product code for HP07 Purifier Hot+Cool Product page: https://www.dyson.com/air-treatment/air-purifier-heaters/purifier-hot-cool-hp07 --- libdyson/__init__.py | 2 ++ libdyson/const.py | 1 + tests/test_init.py | 2 ++ 3 files changed, 5 insertions(+) diff --git a/libdyson/__init__.py b/libdyson/__init__.py index 7b05791..bb4d8fe 100644 --- a/libdyson/__init__.py +++ b/libdyson/__init__.py @@ -15,6 +15,7 @@ DEVICE_TYPE_PURE_HOT_COOL_LINK, DEVICE_TYPE_PURE_HUMIDIFY_COOL, DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL_FORMALDEHYDE, + DEVICE_TYPE_PURIFIER_HOT_COOL, ) from .const import CleaningMode # noqa: F401 from .const import CleaningType # noqa: F401 @@ -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_PURIFIER_HOT_COOL, ]: return DysonPureHotCool(serial, credential, device_type) if device_type == DEVICE_TYPE_PURE_HUMIDIFY_COOL: diff --git a/libdyson/const.py b/libdyson/const.py index 254e1cb..67fbe8e 100644 --- a/libdyson/const.py +++ b/libdyson/const.py @@ -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_PURIFIER_HOT_COOL = "527K" DEVICE_TYPE_NAMES = { DEVICE_TYPE_360_EYE: "360 Eye robot vacuum", diff --git a/tests/test_init.py b/tests/test_init.py index e44111f..47f6921 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -16,6 +16,7 @@ DEVICE_TYPE_PURE_HOT_COOL_LINK, DEVICE_TYPE_PURE_HUMIDIFY_COOL, DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL_FORMALDEHYDE, + DEVICE_TYPE_PURIFIER_HOT_COOL, Dyson360Eye, Dyson360Heurist, DysonDevice, @@ -47,6 +48,7 @@ (DEVICE_TYPE_PURE_HOT_COOL_NEW, DysonPureHotCool), (DEVICE_TYPE_PURE_HUMIDIFY_COOL, DysonPureHumidifyCool), (DEVICE_TYPE_PURIFIER_HUMIDIFY_COOL_FORMALDEHYDE, DysonPurifierHumidifyCoolFormaldehyde), + (DEVICE_TYPE_PURIFIER_HOT_COOL, DysonPureHotCool), ], ) def test_get_device(device_type: str, class_type: Type[DysonDevice]): From 39e845d4076b1ec539dda06a803aa691fec63812 Mon Sep 17 00:00:00 2001 From: Ben Vezzani Date: Sat, 21 Jan 2023 10:44:12 -0500 Subject: [PATCH 2/2] Add product name const for Purifier Hot+Cool --- libdyson/const.py | 1 + 1 file changed, 1 insertion(+) diff --git a/libdyson/const.py b/libdyson/const.py index 67fbe8e..1bc10ea 100644 --- a/libdyson/const.py +++ b/libdyson/const.py @@ -28,6 +28,7 @@ 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", + DEVICE_TYPE_PURIFIER_HOT_COOL: "Purifier Hot+Cool", } ENVIRONMENTAL_OFF = -1