ESPHome
2026.11.0-dev
Loading...
Searching...
No Matches
esphome
components
ld2450
switch
bluetooth_switch.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/components/switch/switch.h
"
4
#include "
../ld2450.h
"
5
6
namespace
esphome::ld2450
{
7
8
class
BluetoothSwitch
:
public
switch_::Switch
,
public
Parented
<LD2450Component> {
9
public
:
10
// User provided, not "= default": `new(p) BluetoothSwitch()` would zero-fill .bss that is already zero.
11
BluetoothSwitch
() {}
12
13
protected
:
14
void
write_state
(
bool
state
)
override
;
15
};
16
17
}
// namespace esphome::ld2450
esphome::Parented
Helper class to easily give an object a parent of type T.
Definition
helpers.h:2073
esphome::ld2450::BluetoothSwitch
Definition
bluetooth_switch.h:8
esphome::ld2450::BluetoothSwitch::BluetoothSwitch
BluetoothSwitch()
Definition
bluetooth_switch.h:11
esphome::ld2450::BluetoothSwitch::write_state
void write_state(bool state) override
Definition
bluetooth_switch.cpp:5
esphome::switch_::Switch
Base class for all switches.
Definition
switch.h:43
esphome::switch_::Switch::state
bool state
The current reported state of the binary sensor.
Definition
switch.h:60
ld2450.h
esphome::ld2450
Definition
factory_reset_button.cpp:3
switch.h
Generated by
1.12.0