From 3318bef5d9d06cdddb28b991d747a11a1a834586 Mon Sep 17 00:00:00 2001 From: Hikaru Wada Date: Sun, 19 Sep 2021 21:06:36 +0900 Subject: [PATCH 1/2] Fix turbo mode status check command --- custom_components/panasonic_smart_app/switch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/panasonic_smart_app/switch.py b/custom_components/panasonic_smart_app/switch.py index 1fde5af..a4d8fa4 100644 --- a/custom_components/panasonic_smart_app/switch.py +++ b/custom_components/panasonic_smart_app/switch.py @@ -266,7 +266,7 @@ def device_class(self) -> str: @property def is_on(self) -> int: status = self.coordinator.data[self.index]["status"] - _turbo_status = status.get("0x08", None) + _turbo_status = status.get("0x1a", None) if _turbo_status == None: return STATE_UNAVAILABLE _is_on = bool(int(_turbo_status)) From 35945d5f684f838f7e9bb3be9eb8587dcf0e197c Mon Sep 17 00:00:00 2001 From: osk2 Date: Mon, 20 Sep 2021 09:17:18 +0800 Subject: [PATCH 2/2] Transform command code to uppercase --- custom_components/panasonic_smart_app/switch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/panasonic_smart_app/switch.py b/custom_components/panasonic_smart_app/switch.py index a4d8fa4..882253f 100644 --- a/custom_components/panasonic_smart_app/switch.py +++ b/custom_components/panasonic_smart_app/switch.py @@ -266,7 +266,7 @@ def device_class(self) -> str: @property def is_on(self) -> int: status = self.coordinator.data[self.index]["status"] - _turbo_status = status.get("0x1a", None) + _turbo_status = status.get("0x1A", None) if _turbo_status == None: return STATE_UNAVAILABLE _is_on = bool(int(_turbo_status))