JeffResc / Sonoff-D1-Dimmer

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

Initial fixes for dimmer_rf #2

Closed robbz23 closed 4 years ago

robbz23 commented 4 years ago

Removed the lastbinary and lastbrightness because the weren't being used.

Added isReceivedValue to denote whether we got this from serial (RF) or if it was set by the ESP. This keeps us from setting a value if it was already set by RF.

Changed int to float for brightness so when dividing it we also get a float.

Changed division and multiplication to be by 100

JeffResc commented 4 years ago

Thanks for taking a look at this for me, I appreciate the contribution 👍