ESPHome
2025.5.0
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
{
8
namespace
tm1638 {
9
10
class
TM1638SwitchLed
:
public
switch_::Switch
,
public
Component
{
11
public
:
12
void
dump_config
()
override
;
13
14
void
set_tm1638
(
TM1638Component
*tm1638) {
tm1638_
= tm1638; }
15
void
set_lednum
(
int
led) {
led_
= led; }
16
17
protected
:
18
void
write_state
(
bool
state
)
override
;
19
TM1638Component
*
tm1638_
;
20
int
led_
;
21
};
22
}
// namespace tm1638
23
}
// namespace esphome
esphome::Component
Definition
component.h:70
esphome::switch_::Switch
Base class for all switches.
Definition
switch.h:39
esphome::switch_::Switch::state
bool state
The current reported state of the binary sensor.
Definition
switch.h:53
esphome::tm1638::TM1638Component
Definition
tm1638.h:23
esphome::tm1638::TM1638SwitchLed
Definition
tm1638_switch_led.h:10
esphome::tm1638::TM1638SwitchLed::tm1638_
TM1638Component * tm1638_
Definition
tm1638_switch_led.h:19
esphome::tm1638::TM1638SwitchLed::dump_config
void dump_config() override
Definition
tm1638_switch_led.cpp:14
esphome::tm1638::TM1638SwitchLed::led_
int led_
Definition
tm1638_switch_led.h:20
esphome::tm1638::TM1638SwitchLed::set_tm1638
void set_tm1638(TM1638Component *tm1638)
Definition
tm1638_switch_led.h:14
esphome::tm1638::TM1638SwitchLed::write_state
void write_state(bool state) override
Definition
tm1638_switch_led.cpp:9
esphome::tm1638::TM1638SwitchLed::set_lednum
void set_lednum(int led)
Definition
tm1638_switch_led.h:15
component.h
esphome
Providing packet encoding functions for exchanging data with a remote host.
Definition
a01nyub.cpp:7
switch.h
tm1638.h
Generated by
1.12.0