JeffResc / Sonoff-D1-Dimmer

Sonoff D1 Dimmer running ESPHome
https://jeffresc.dev/blog/2020-10-10
MIT License
8 stars 6 forks source link

Fix can not set brightness to 100 percent. #4

Closed g19i85g closed 3 years ago

JeffResc commented 3 years ago

@g19i85g — Thanks for the contribution.

I haven't looked at the source code of this Dimmer for a bit now, but when I made it, I know Tasmota's source code used a brightness out of 64 rather than 100. Could you please cite somewhere that shows that it should be 100 rather than 64?

g19i85g commented 3 years ago

https://github.com/JeffResc/Sonoff-D1-Dimmer/blob/d3bfa83176f0c18c48a3bc5824867b80ab38041c/d1_dimmer_rf/d1_dimmer_rf.h#L122

Here is the value for 100 percent brightness hex 64 this is 100 in dezimal.

https://github.com/JeffResc/Sonoff-D1-Dimmer/blob/d3bfa83176f0c18c48a3bc5824867b80ab38041c/d1_dimmer_rf/d1_dimmer_rf.h#L187

At this line it is also 100.

JeffResc commented 3 years ago

Ah, I misunderstood at first. This looks good 👍

Thanks for the contribution! 🎉