ESPHome 2025.5.0
Loading...
Searching...
No Matches
pipsolar_switch.h
Go to the documentation of this file.
1#pragma once
2
3#include "../pipsolar.h"
6
7namespace esphome {
8namespace pipsolar {
9class Pipsolar;
11 public:
12 void set_parent(Pipsolar *parent) { this->parent_ = parent; };
13 void set_on_command(const std::string &command) { this->on_command_ = command; };
14 void set_off_command(const std::string &command) { this->off_command_ = command; };
15 void dump_config() override;
16
17 protected:
18 void write_state(bool state) override;
19 std::string on_command_;
20 std::string off_command_;
22};
23
24} // namespace pipsolar
25} // namespace esphome
void set_parent(Pipsolar *parent)
void set_on_command(const std::string &command)
void set_off_command(const std::string &command)
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:53
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7