Rework tlc5947 to remove AUTO_LOAD (#6503)

This commit is contained in:
Jesse Hills
2024-04-09 15:51:54 +12:00
committed by GitHub
parent c66b2c52c1
commit 12aa272234
13 changed files with 107 additions and 35 deletions
@@ -0,0 +1,12 @@
#include "tlc5947_output.h"
namespace esphome {
namespace tlc5947 {
void TLC5947Channel::write_state(float state) {
auto amount = static_cast<uint16_t>(state * 0xfff);
this->parent_->set_channel_value(this->channel_, amount);
}
} // namespace tlc5947
} // namespace esphome