ESPHome 2026.2.4
Loading...
Searching...
No Matches
pipsolar_switch.cpp
Go to the documentation of this file.
1#include "pipsolar_switch.h"
2#include "esphome/core/log.h"
4
5namespace esphome {
6namespace pipsolar {
7
8static const char *const TAG = "pipsolar.switch";
9
10void PipsolarSwitch::dump_config() { LOG_SWITCH("", "Pipsolar Switch", this); }
12 const char *command = state ? this->on_command_ : this->off_command_;
13 if (command != nullptr) {
14 this->parent_->queue_command(command);
15 }
16}
17
18} // namespace pipsolar
19} // namespace esphome
void write_state(bool state) override
bool state
The current reported state of the binary sensor.
Definition switch.h:56
bool state
Definition fan.h:2
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7