Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Dimmer doesn't turn off completely with version 2021.9? #9

Open
Protoncek opened this issue Sep 20, 2021 · 8 comments
Open

Dimmer doesn't turn off completely with version 2021.9? #9

Protoncek opened this issue Sep 20, 2021 · 8 comments

Comments

@Protoncek
Copy link

Another day, another problem...
Today i updated my dimmer with latest version of ESPHome (2021.9.1) program and now dimmer doesn't turn off at all - it stays at appr. 1% no matter what i do. If i turn on/off with button (on gpio4) brightness changes just a tiny bit - like, say from 1% to 0.8% - i can see tiny difference, but won't turn off. Via HA command it goes to any percentage i have it set, but again, it won't go off, but it stays at just under 1%.

ESPHome log however nicely says that it went down to zero. Just it's not true...

Going back to 2021.8.2 solves the problem. Absolutely NO changes made in program...

Now i managed to go back to 2021.8.2 and it works again - luckily i have a parallel "test" installation...

Any clues?

@luca-iodice
Copy link

Same problem here

@luca-iodice
Copy link

The issue seems to be related to this commit esphome/esphome#2320

@larsenglund
Copy link

I have the same problem.

@larsenglund
Copy link

It's strange though since the log clearly states that we sending zero brightness into control_dimmer:
[15:42:34][D][custom:093]: Interpreting brightness 0.000000 as 0
And that just sends that zero to the dimmer IC via Serial.write so there should be no problem.. hmm..

larsenglund added a commit to larsenglund/Sonoff-D1-Dimmer that referenced this issue Oct 6, 2021
Fixes this issue JeffResc#9 by actually turning the light off when brightness reaches zero.
Also removes some unnecessary serial writes by updating the lastBinary and lastBrightness variables.
@larsenglund
Copy link

larsenglund commented Oct 6, 2021

I think I fixed the problem (works for me™), made a pull request for it here #10

@Protoncek
Copy link
Author

Protoncek commented Oct 7, 2021

Now it turns off completely, yes, but now there's another problem: when light is off then ESPHome doesn't "see" that and continously thinks that it's on. Condition

if:
  condition:
    light.is_off: pavle_dimmer

always returns false ("ON"), even when light is off. so now i can't turn off light with button, connected to ESPHome (directly, not via HA).
Interesting is that state in HA is off, just state inside ESPHome is always ON...

@larsenglund
Copy link

@Protoncek indeed, seems that the off-state is not updated when turning off due to zero brightness. I tried adding state->turn_off(); and state->publish_state(); in write_state but that didn't help :(

@Protoncek
Copy link
Author

Well, at least i’m glad that you also found the problem and it’s not just me…
I hope you (or @JeffResc ) will find the problem.
Many thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants