From d2f1657e68a697e2dd6c467a83dffce9e0b95757 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Thu, 18 Apr 2019 17:08:32 +0200 Subject: [PATCH] Fixed issue with simple relay in Philips Hue emulation from Alexa app --- sonoff/xplg_wemohue.ino | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sonoff/xplg_wemohue.ino b/sonoff/xplg_wemohue.ino index 99e570e8f..d505ae982 100644 --- a/sonoff/xplg_wemohue.ino +++ b/sonoff/xplg_wemohue.ino @@ -585,10 +585,8 @@ void HueLightStatus1(uint8_t device, String *response) } *response += FPSTR(HUE_LIGHTS_STATUS_JSON1); response->replace("{state}", (power & (1 << (device-1))) ? "true" : "false"); + light_status += "\"bri\":" + String((uint8_t)(254.0f * bri + 0.5f)) + ","; - if (LST_SINGLE <= light_subtype) { - light_status += "\"bri\":" + String((uint8_t)(254.0f * bri + 0.5f)) + ","; - } if (LST_RGB <= light_subtype) { // colors light_status += "\"hue\":" + String((uint16_t)(65535.0f * hue + 0.5f)) + ","; light_status += "\"sat\":" + String((uint8_t)(254.0f * sat + 0.5f)) + ",";