ESPHome 2025.5.0
Loading...
Searching...
No Matches
homeassistant_switch.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace esphome {
7namespace homeassistant {
8
10 public:
11 void set_entity_id(const std::string &entity_id) { this->entity_id_ = entity_id; }
12 void setup() override;
13 void dump_config() override;
14 float get_setup_priority() const override;
15
16 protected:
17 void write_state(bool state) override;
18 std::string entity_id_;
19};
20
21} // namespace homeassistant
22} // namespace esphome
void set_entity_id(const std::string &entity_id)
Base class for all switches.
Definition switch.h:39
bool state
The current reported state of the binary sensor.
Definition switch.h:53
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7