Fixed issue with simple relay in Philips Hue emulation from Alexa app

This commit is contained in:
Stephan Hadinger 2019-04-18 17:08:32 +02:00
parent 78ffc3085d
commit d2f1657e68
1 changed files with 1 additions and 3 deletions

View File

@ -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)) + ",";