ESPHome 2025.9.0-dev
Loading...
Searching...
No Matches
copy_switch.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace esphome {
7namespace copy {
8
9class CopySwitch : public switch_::Switch, public Component {
10 public:
11 void set_source(switch_::Switch *source) { source_ = source; }
12 void setup() override;
13 void dump_config() override;
14
15 protected:
16 void write_state(bool state) override;
17
19};
20
21} // namespace copy
22} // namespace esphome
switch_::Switch * source_
Definition copy_switch.h:18
void dump_config() override
void set_source(switch_::Switch *source)
Definition copy_switch.h:11
void write_state(bool state) override
Base class for all switches.
Definition switch.h:39
bool state
The current reported state of the binary sensor.
Definition switch.h:56
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7