diff --git a/libdyson/__init__.py b/libdyson/__init__.py index 020ced6..d3c40ef 100644 --- a/libdyson/__init__.py +++ b/libdyson/__init__.py @@ -11,6 +11,7 @@ DEVICE_TYPE_PURE_COOL_LINK, DEVICE_TYPE_PURE_COOL_LINK_DESK, DEVICE_TYPE_PURE_HOT_COOL, + DEVICE_TYPE_PURE_HOT_COOL_NEW, DEVICE_TYPE_PURE_HOT_COOL_LINK, DEVICE_TYPE_PURE_HOT_COOL_LINK_NEW, DEVICE_TYPE_PURE_HUMIDIFY_COOL, @@ -58,7 +59,10 @@ def get_device(serial: str, credential: str, device_type: str) -> Optional[Dyson DEVICE_TYPE_PURE_HOT_COOL_LINK_NEW, ]: return DysonPureHotCoolLink(serial, credential, device_type) - if device_type == DEVICE_TYPE_PURE_HOT_COOL: + if device_type in [ + DEVICE_TYPE_PURE_HOT_COOL, + DEVICE_TYPE_PURE_HOT_COOL_NEW, + ]: return DysonPureHotCool(serial, credential, device_type) if device_type == DEVICE_TYPE_PURE_HUMIDIFY_COOL: return DysonPureHumidifyCool(serial, credential, device_type) diff --git a/libdyson/const.py b/libdyson/const.py index a13550c..f45a71b 100644 --- a/libdyson/const.py +++ b/libdyson/const.py @@ -12,6 +12,7 @@ DEVICE_TYPE_PURE_HOT_COOL_LINK = "455" DEVICE_TYPE_PURE_HOT_COOL_LINK_NEW = "455A" DEVICE_TYPE_PURE_HOT_COOL = "527" +DEVICE_TYPE_PURE_HOT_COOL_NEW = "527E" DEVICE_TYPE_NAMES = { DEVICE_TYPE_360_EYE: "360 Eye robot vacuum", @@ -22,6 +23,7 @@ DEVICE_TYPE_PURE_COOL_LINK: "Pure Cool Link", 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_LINK: "Pure Hot+Cool Link", DEVICE_TYPE_PURE_HOT_COOL_LINK_NEW: "Pure Hot+Cool Link (New)", DEVICE_TYPE_PURE_HUMIDIFY_COOL: "Pure Humidify+Cool", diff --git a/tests/test_init.py b/tests/test_init.py index bfa50a5..fa04c42 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -12,6 +12,7 @@ DEVICE_TYPE_PURE_COOL_LINK, DEVICE_TYPE_PURE_COOL_LINK_DESK, DEVICE_TYPE_PURE_HOT_COOL, + DEVICE_TYPE_PURE_HOT_COOL_NEW, DEVICE_TYPE_PURE_HOT_COOL_LINK, DEVICE_TYPE_PURE_HOT_COOL_LINK_NEW, DEVICE_TYPE_PURE_HUMIDIFY_COOL, @@ -42,6 +43,7 @@ (DEVICE_TYPE_PURE_HOT_COOL_LINK, DysonPureHotCoolLink), (DEVICE_TYPE_PURE_HOT_COOL_LINK_NEW, DysonPureHotCoolLink), (DEVICE_TYPE_PURE_HOT_COOL, DysonPureHotCool), + (DEVICE_TYPE_PURE_HOT_COOL_NEW, DysonPureHotCool), (DEVICE_TYPE_PURE_HUMIDIFY_COOL, DysonPureHumidifyCool), ], )