ESPHome 2026.5.3
Loading...
Searching...
No Matches
pipsolar_output.cpp
Go to the documentation of this file.
1#include "pipsolar_output.h"
3#include "esphome/core/log.h"
4
6
7static const char *const TAG = "pipsolar.output";
8
10 char tmp[16];
11 snprintf(tmp, sizeof(tmp), this->set_command_, state);
12
13 if (std::find(this->possible_values_.begin(), this->possible_values_.end(), state) != this->possible_values_.end()) {
14 ESP_LOGD(TAG, "Will write: %s out of value %f / %02.0f", tmp, state, state);
15 this->parent_->queue_command(std::string(tmp));
16 } else {
17 ESP_LOGD(TAG, "Will not write: %s as it is not in list of allowed values", tmp);
18 }
19}
20} // namespace esphome::pipsolar
void write_state(float state) override
std::vector< float > possible_values_
bool state
Definition fan.h:2