Skip to content

Commit

Permalink
dimmer: set led when in relay mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ljalves committed Jan 24, 2022
1 parent df471b7 commit 207943c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dimmer.c
Expand Up @@ -64,10 +64,15 @@ void USER_FUNC dimmer_set(uint8_t lvl, uint8_t source)


if (state->relay_state == 0) {
if (state->cfg.wifi_led == LED_CONFIG_RELAY)
led_ctrl("f");

gpio_i2c_send(I2C_ADDR, 0);
sprintf(buf, "%d", 0);
mqttcli_publish(buf, "dimmer");
} else {
if (state->cfg.wifi_led == LED_CONFIG_RELAY)
led_ctrl("n");

/* top limit */
if (lvl > 0x80)
Expand Down

0 comments on commit 207943c

Please sign in to comment.