From 5529bcc1149e60d5bcf93af47fec04e83ac755b3 Mon Sep 17 00:00:00 2001 From: mcc05 <38889743+mcc05@users.noreply.github.com> Date: Mon, 29 Apr 2019 02:29:12 +0100 Subject: [PATCH] Fixed AlexaPowerController to report power state for thermostats (#23468) Fixed AlexaPowerController to report power state for thermostats, to look if state is OFF return OFF, otherwise report ON as thermostats have multiple values for ON --- homeassistant/components/alexa/smart_home.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/alexa/smart_home.py b/homeassistant/components/alexa/smart_home.py index e16a1d45ab7..21a65b1ede1 100644 --- a/homeassistant/components/alexa/smart_home.py +++ b/homeassistant/components/alexa/smart_home.py @@ -449,9 +449,9 @@ class _AlexaPowerController(_AlexaInterface): if name != 'powerState': raise _UnsupportedProperty(name) - if self.entity.state == STATE_ON: - return 'ON' - return 'OFF' + if self.entity.state == STATE_OFF: + return 'OFF' + return 'ON' class _AlexaLockController(_AlexaInterface):