ESPHome
2026.8.0b4
Loading...
Searching...
No Matches
esphome
components
ld6002b
switch
ld6002b_switch.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/components/switch/switch.h
"
4
#include "
../ld6002b.h
"
5
6
namespace
esphome::ld6002b
{
7
8
class
LD6002BSwitch
:
public
switch_::Switch
,
public
Parented
<LD6002BComponent> {
9
public
:
10
explicit
LD6002BSwitch
(
SwitchType
type
) :
type_
(
type
) {}
11
12
protected
:
13
void
write_state
(
bool
state
)
override
;
14
15
SwitchType
type_
;
16
};
17
18
}
// namespace esphome::ld6002b
esphome::Parented
Helper class to easily give an object a parent of type T.
Definition
helpers.h:1907
esphome::ld6002b::LD6002BSwitch
Definition
ld6002b_switch.h:8
esphome::ld6002b::LD6002BSwitch::write_state
void write_state(bool state) override
Definition
ld6002b_switch.cpp:5
esphome::ld6002b::LD6002BSwitch::LD6002BSwitch
LD6002BSwitch(SwitchType type)
Definition
ld6002b_switch.h:10
esphome::ld6002b::LD6002BSwitch::type_
SwitchType type_
Definition
ld6002b_switch.h:15
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
type
uint16_t type
Definition
dns_server_esp32_idf.cpp:0
ld6002b.h
esphome::ld6002b
Definition
ld6002b_button.cpp:3
esphome::ld6002b::SwitchType
SwitchType
Definition
ld6002b.h:63
switch.h
Generated by
1.12.0