ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
restart_switch.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace esphome::restart {
7
8class RestartSwitch final : public switch_::Switch, public Component {
9 public:
10 // User provided, not "= default": `new(p) RestartSwitch()` would zero-fill .bss that is already zero.
12
13 void dump_config() override;
14
15 protected:
16 void write_state(bool state) override;
17};
18
19} // namespace esphome::restart
void write_state(bool state) override
Base class for all switches.
Definition switch.h:43
bool state
The current reported state of the binary sensor.
Definition switch.h:60