ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
copy_switch.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace esphome::copy {
7
8class CopySwitch final : public switch_::Switch, public Component {
9 SUB_SWITCH(source)
10
11 public:
12 void setup() override;
13 void dump_config() override;
14
15 protected:
16 void write_state(bool state) override;
17};
18
19} // namespace esphome::copy
virtual void setup()
Where the component's initialization should happen.
Definition component.cpp:84
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