ESPHome
2026.8.0b4
Loading...
Searching...
No Matches
esphome
components
ld6002b
switch
ld6002b_switch.cpp
Go to the documentation of this file.
1
#include "
ld6002b_switch.h
"
2
3
namespace
esphome::ld6002b
{
4
5
void
LD6002BSwitch::write_state
(
bool
state
) {
6
this->
parent_
->set_switch_state(this->
type_
, state);
7
this->
publish_state
(state);
8
}
9
10
}
// namespace esphome::ld6002b
esphome::Parented< LD6002BComponent >::parent_
LD6002BComponent * parent_
Definition
helpers.h:1918
esphome::ld6002b::LD6002BSwitch::write_state
void write_state(bool state) override
Definition
ld6002b_switch.cpp:5
esphome::ld6002b::LD6002BSwitch::type_
SwitchType type_
Definition
ld6002b_switch.h:15
esphome::switch_::Switch::publish_state
void publish_state(bool state)
Publish a state to the front-end from the back-end.
Definition
switch.cpp:56
state
bool state
Definition
fan.h:2
ld6002b_switch.h
esphome::ld6002b
Definition
ld6002b_button.cpp:3
Generated by
1.12.0