ESPHome
2024.4.1
esphome
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::tm1638::TM1638SwitchLed
Definition:
tm1638_switch_led.h:10
esphome::tm1638::TM1638Component
Definition:
tm1638.h:23
esphome::switch_::Switch
Base class for all switches.
Definition:
switch.h:39
esphome::Component
Definition:
component.h:68
esphome::tm1638::TM1638SwitchLed::led_
int led_
Definition:
tm1638_switch_led.h:20
esphome::tm1638::TM1638SwitchLed::set_lednum
void set_lednum(int led)
Definition:
tm1638_switch_led.h:15
esphome::tm1638::TM1638SwitchLed::dump_config
void dump_config() override
Definition:
tm1638_switch_led.cpp:14
esphome::tm1638::TM1638SwitchLed::tm1638_
TM1638Component * tm1638_
Definition:
tm1638_switch_led.h:19
switch.h
esphome
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition:
a01nyub.cpp:7
component.h
esphome::tm1638::TM1638SwitchLed::set_tm1638
void set_tm1638(TM1638Component *tm1638)
Definition:
tm1638_switch_led.h:14
esphome::switch_::Switch::state
bool state
The current reported state of the binary sensor.
Definition:
switch.h:53
esphome::tm1638::TM1638SwitchLed::write_state
void write_state(bool state) override
Definition:
tm1638_switch_led.cpp:9
Generated by
1.8.13