mirror of https://github.com/arendst/Tasmota.git
Fixed PWM1 always full brightness, and Sonoff Basic / Relay not working
This commit is contained in:
parent
d1b073e01d
commit
5a52d1f568
|
@ -684,8 +684,6 @@ public:
|
||||||
// channel 0=intensity, channel2=temperature
|
// channel 0=intensity, channel2=temperature
|
||||||
light_current_color[0] = bri; // set brightness from r (white)
|
light_current_color[0] = bri; // set brightness from r (white)
|
||||||
light_current_color[1] = c;
|
light_current_color[1] = c;
|
||||||
} else if (LT_PWM1 == light_type) {
|
|
||||||
light_current_color[0] = 255; // One PWM channel only supports Dimmer but needs max color
|
|
||||||
} else {
|
} else {
|
||||||
switch (light_subtype) {
|
switch (light_subtype) {
|
||||||
case LST_NONE:
|
case LST_NONE:
|
||||||
|
|
|
@ -628,9 +628,9 @@ void HueLightStatus1(uint8_t device, String *response)
|
||||||
*response += FPSTR(HUE_LIGHTS_STATUS_JSON1);
|
*response += FPSTR(HUE_LIGHTS_STATUS_JSON1);
|
||||||
response->replace("{state}", (power & (1 << (device-1))) ? "true" : "false");
|
response->replace("{state}", (power & (1 << (device-1))) ? "true" : "false");
|
||||||
// Brightness for all devices with PWM
|
// Brightness for all devices with PWM
|
||||||
if (LST_SINGLE <= light_subtype) {
|
//if (LST_SINGLE <= light_subtype) {
|
||||||
light_status += "\"bri\":" + String(bri) + ",";
|
light_status += "\"bri\":" + String(bri) + ",";
|
||||||
}
|
//}
|
||||||
if (LST_COLDWARM <= light_subtype) {
|
if (LST_COLDWARM <= light_subtype) {
|
||||||
light_status += "\"colormode\":\"" + String(g_gotct ? "ct" : "hs") + "\",";
|
light_status += "\"colormode\":\"" + String(g_gotct ? "ct" : "hs") + "\",";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue