Skip to content

Commit

Permalink
PS_16_DZ: Implement SetOption43 (Dimmer Max) for PS_16_DZ dimmers. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Shantur Rathore committed Oct 2, 2019
1 parent f946eba commit 39b2018
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sonoff/xdrv_19_ps16dz_dimmer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ void PS16DZSerialSendUpdateCommand(void)
uint8_t light_state_dimmer = light_state.getDimmer();
// Dimming acts odd below 10% - this mirrors the threshold set on the faceplate itself
light_state_dimmer = (light_state_dimmer < 10) ? 10 : light_state_dimmer;
light_state_dimmer = (light_state_dimmer > Settings.param[P_DIMMER_MAX]) ? Settings.param[P_DIMMER_MAX] : light_state_dimmer;

snprintf_P(Ps16dz.tx_buffer, PS16DZ_BUFFER_SIZE, PSTR("AT+UPDATE=\"sequence\":\"%d%03d\",\"switch\":\"%s\",\"bright\":%d"),
LocalTime(), millis()%1000, power?"on":"off", light_state_dimmer);
Expand Down

0 comments on commit 39b2018

Please sign in to comment.