ESPHome 2026.6.0-dev
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::copy {
5
6static const char *const TAG = "copy.number";
7
18
19void CopyNumber::dump_config() { LOG_NUMBER("", "Copy Number", this); }
20
21void CopyNumber::control(float value) {
22 auto call2 = source_->make_call();
23 call2.set_value(value);
24 call2.perform();
25}
26
27} // namespace esphome::copy
bool has_state() const
void dump_config() override
void control(float value) override
number::Number * source_
Definition copy_number.h:17
NumberCall & set_value(float value)
NumberCall make_call()
Definition number.h:35
void publish_state(float state)
Definition number.cpp:22
void add_on_state_callback(F &&callback)
Definition number.h:37
NumberTraits traits
Definition number.h:41
void set_min_value(float min_value)
void set_max_value(float max_value)