ESPHome  2024.11.0
tm1638_switch_led.cpp
Go to the documentation of this file.
1 #include "tm1638_switch_led.h"
2 #include "esphome/core/log.h"
3 
4 namespace esphome {
5 namespace tm1638 {
6 
7 static const char *const TAG = "tm1638.led";
8 
10  tm1638_->set_led(led_, state);
11  publish_state(state);
12 }
13 
15  LOG_SWITCH("", "TM1638 LED", this);
16  ESP_LOGCONFIG(TAG, " LED: %d", led_);
17 }
18 
19 } // namespace tm1638
20 } // namespace esphome
uint8_t uint8_t void set_led(int led_pos, bool led_on_off)
Definition: tm1638.cpp:115
const char *const TAG
Definition: spi.cpp:8
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
void publish_state(bool state)
Publish a state to the front-end from the back-end.
Definition: switch.cpp:47
bool state
Definition: fan.h:34
void write_state(bool state) override