ESPHome
2026.6.0-dev
Loading...
Searching...
No Matches
esphome
components
tm1638
switch
tm1638_switch_led.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/components/switch/switch.h
"
5
#include "
../tm1638.h
"
6
7
namespace
esphome::tm1638
{
8
9
class
TM1638SwitchLed
:
public
switch_::Switch
,
public
Component
{
10
public
:
11
void
dump_config
()
override
;
12
13
void
set_tm1638
(
TM1638Component
*tm1638) {
tm1638_
= tm1638; }
14
void
set_lednum
(
int
led) {
led_
= led; }
15
16
protected
:
17
void
write_state
(
bool
state
)
override
;
18
TM1638Component
*
tm1638_
;
19
int
led_
;
20
};
21
}
// namespace esphome::tm1638
esphome::Component
Definition
component.h:145
esphome::switch_::Switch
Base class for all switches.
Definition
switch.h:38
esphome::switch_::Switch::state
bool state
The current reported state of the binary sensor.
Definition
switch.h:55
esphome::tm1638::TM1638Component
Definition
tm1638.h:23
esphome::tm1638::TM1638SwitchLed
Definition
tm1638_switch_led.h:9
esphome::tm1638::TM1638SwitchLed::tm1638_
TM1638Component * tm1638_
Definition
tm1638_switch_led.h:18
esphome::tm1638::TM1638SwitchLed::dump_config
void dump_config() override
Definition
tm1638_switch_led.cpp:13
esphome::tm1638::TM1638SwitchLed::led_
int led_
Definition
tm1638_switch_led.h:19
esphome::tm1638::TM1638SwitchLed::set_tm1638
void set_tm1638(TM1638Component *tm1638)
Definition
tm1638_switch_led.h:13
esphome::tm1638::TM1638SwitchLed::write_state
void write_state(bool state) override
Definition
tm1638_switch_led.cpp:8
esphome::tm1638::TM1638SwitchLed::set_lednum
void set_lednum(int led)
Definition
tm1638_switch_led.h:14
component.h
esphome::tm1638
Definition
tm1638_key.cpp:3
switch.h
tm1638.h
Generated by
1.12.0