ESPHome 2025.5.0
Loading...
Searching...
No Matches
output.h
Go to the documentation of this file.
1#pragma once
2
5#include "esphome/core/log.h"
6
7namespace esphome {
8namespace opentherm {
9
11 protected:
12 bool has_state_ = false;
13 const char *id_ = nullptr;
14
16
17 public:
18 float state;
19
20 void set_id(const char *id) { this->id_ = id; }
21
22 void write_state(float state) override;
23
24 bool has_state() { return this->has_state_; };
25
26 void set_min_value(float min_value) override { this->min_value_ = min_value; }
27 void set_max_value(float max_value) override { this->max_value_ = max_value; }
28 float get_min_value() { return this->min_value_; }
29 float get_max_value() { return this->max_value_; }
30};
31
32} // namespace opentherm
33} // namespace esphome
void set_max_value(float max_value) override
Definition output.h:27
void set_min_value(float min_value) override
Definition output.h:26
void set_id(const char *id)
Definition output.h:20
void write_state(float state) override
Definition output.cpp:9
Base class for all output components that can output a variable level, like PWM.
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7
T id(T value)
Helper function to make id(var) known from lambdas work in custom components.
Definition helpers.h:798