ESPHome
2026.5.1
Loading...
Searching...
No Matches
esphome
components
factory_reset
switch
factory_reset_switch.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/components/switch/switch.h
"
4
#include "
esphome/core/component.h
"
5
#include "
esphome/core/defines.h
"
6
7
namespace
esphome::factory_reset
{
8
9
class
FactoryResetSwitch
:
public
switch_::Switch
,
public
Component
{
10
public
:
11
void
dump_config
()
override
;
12
#ifdef USE_OPENTHREAD
13
static
void
factory_reset_callback
();
14
#endif
15
16
protected
:
17
void
write_state
(
bool
state
)
override
;
18
};
19
20
}
// namespace esphome::factory_reset
esphome::Component
Definition
component.h:145
esphome::factory_reset::FactoryResetSwitch
Definition
factory_reset_switch.h:9
esphome::factory_reset::FactoryResetSwitch::factory_reset_callback
static void factory_reset_callback()
Definition
factory_reset_switch.cpp:35
esphome::factory_reset::FactoryResetSwitch::write_state
void write_state(bool state) override
Definition
factory_reset_switch.cpp:17
esphome::factory_reset::FactoryResetSwitch::dump_config
void dump_config() override
Definition
factory_reset_switch.cpp:16
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
component.h
defines.h
esphome::factory_reset
Definition
factory_reset_button.cpp:12
switch.h
Generated by
1.12.0