ESPHome 2026.6.0-dev
Loading...
Searching...
No Matches
homeassistant_switch.h
Go to the documentation of this file.
1#pragma once
2
5
7
9 public:
10 void set_entity_id(const char *entity_id) { this->entity_id_ = entity_id; }
11 void setup() override;
12 void dump_config() override;
13 float get_setup_priority() const override;
14
15 protected:
16 void write_state(bool state) override;
17 const char *entity_id_{nullptr};
18};
19
20} // namespace esphome::homeassistant
Base class for all switches.
Definition switch.h:38
bool state
The current reported state of the binary sensor.
Definition switch.h:55