ESPHome 2026.6.0-dev
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::pipsolar {
6
7static const char *const TAG = "pipsolar.switch";
8
9void PipsolarSwitch::dump_config() { LOG_SWITCH("", "Pipsolar Switch", this); }
11 const char *command = state ? this->on_command_ : this->off_command_;
12 if (command != nullptr) {
13 this->parent_->queue_command(command);
14 }
15}
16
17} // namespace esphome::pipsolar
void write_state(bool state) override
bool state
The current reported state of the binary sensor.
Definition switch.h:55
bool state
Definition fan.h:2