From 03fda91ac48ff38384e32e3755065f45621b5635 Mon Sep 17 00:00:00 2001 From: roiff Date: Mon, 11 Dec 2017 12:12:52 +0800 Subject: [PATCH] fix powerstate invalid Fix invalid bug --- miio/airconditioningcompanion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miio/airconditioningcompanion.py b/miio/airconditioningcompanion.py index fbc91ee40..410a8ada4 100644 --- a/miio/airconditioningcompanion.py +++ b/miio/airconditioningcompanion.py @@ -42,7 +42,7 @@ def air_condition_model(self) -> str: @property def power(self) -> str: """Current power state.""" - return 'on' if (self.data[1][2:3] == 1) else 'off' + return 'on' if (self.data[1][2:3] == '1') else 'off' @property def is_on(self) -> bool: