ESPHome 2025.5.0
Loading...
Searching...
No Matches
copy_number.cpp
Go to the documentation of this file.
1#include "copy_number.h"
2#include "esphome/core/log.h"
3
4namespace esphome {
5namespace copy {
6
7static const char *const TAG = "copy.number";
8
19
20void CopyNumber::dump_config() { LOG_NUMBER("", "Copy Number", this); }
21
22void CopyNumber::control(float value) {
23 auto call2 = source_->make_call();
24 call2.set_value(value);
25 call2.perform();
26}
27
28} // namespace copy
29} // namespace esphome
void dump_config() override
void control(float value) override
number::Number * source_
Definition copy_number.h:19
NumberCall & set_value(float value)
NumberCall make_call()
Definition number.h:45
void publish_state(float state)
Definition number.cpp:9
NumberTraits traits
Definition number.h:49
bool has_state() const
Return whether this number has gotten a full state yet.
Definition number.h:52
void add_on_state_callback(std::function< void(float)> &&callback)
Definition number.cpp:16
void set_min_value(float min_value)
void set_max_value(float max_value)
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7