From cf5784769b91a8cc8b76c6fee49609a2e813a938 Mon Sep 17 00:00:00 2001 From: Joshua Mulliken Date: Wed, 7 Apr 2021 23:26:21 -0400 Subject: [PATCH] Fix Headphones not recognized by DeviceTypes enum See: https://github.com/JoshuaMulliken/ha-wyzeapi/issues/126#issuecomment-815292861 Why: In order to fix a crash where headphones were not recognized as a valid device type How: Add headphones to the DeviceTypes enum in base_client.py --- setup.cfg | 2 +- src/wyzeapy/base_client.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 4ded317..018b124 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [metadata] # replace with your username: name = wyzeapy -version = 0.0.11 +version = 0.0.12 author = Mulliken LLC author_email = joshua@mulliken.net description = Python client for private Wyze API diff --git a/src/wyzeapy/base_client.py b/src/wyzeapy/base_client.py index 9c3022c..95d9935 100644 --- a/src/wyzeapy/base_client.py +++ b/src/wyzeapy/base_client.py @@ -12,7 +12,7 @@ import requests PHONE_SYSTEM_TYPE = "1" -API_KEY = 'WMXHYf79Nr5gIlt3r0r7p9Tcw5bvs6BB4U8O8nGJ' +API_KEY = "WMXHYf79Nr5gIlt3r0r7p9Tcw5bvs6BB4U8O8nGJ" APP_VERSION = "2.18.43" APP_VER = "com.hualai.WyzeCam___2.18.43" APP_NAME = "com.hualai.WyzeCam" @@ -35,6 +35,7 @@ class DeviceTypes(Enum): GATEWAY = "gateway" COMMON = "Common" VACUUM = "JA_RO2" + HEADPHONES = "JA.SC" class PropertyIDs(Enum):