ESPHome
2026.5.1
Loading...
Searching...
No Matches
esphome
components
restart
switch
restart_switch.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
6
namespace
esphome::restart
{
7
8
class
RestartSwitch
:
public
switch_::Switch
,
public
Component
{
9
public
:
10
void
dump_config
()
override
;
11
12
protected
:
13
void
write_state
(
bool
state
)
override
;
14
};
15
16
}
// namespace esphome::restart
esphome::Component
Definition
component.h:145
esphome::restart::RestartSwitch
Definition
restart_switch.h:8
esphome::restart::RestartSwitch::write_state
void write_state(bool state) override
Definition
restart_switch.cpp:10
esphome::restart::RestartSwitch::dump_config
void dump_config() override
Definition
restart_switch.cpp:21
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
esphome::restart
Definition
restart_button.cpp:6
switch.h
Generated by
1.12.0