ESPHome  2024.6.1
tuya_number.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace esphome {
8 namespace tuya {
9 
10 class TuyaNumber : public number::Number, public Component {
11  public:
12  void setup() override;
13  void dump_config() override;
14  void set_number_id(uint8_t number_id) { this->number_id_ = number_id; }
15  void set_write_multiply(float factor) { multiply_by_ = factor; }
16 
17  void set_tuya_parent(Tuya *parent) { this->parent_ = parent; }
18 
19  protected:
20  void control(float value) override;
21 
23  uint8_t number_id_{0};
24  float multiply_by_{1.0};
26 };
27 
28 } // namespace tuya
29 } // namespace esphome
TuyaDatapointType type_
Definition: tuya_number.h:25
void setup() override
Definition: tuya_number.cpp:9
TuyaDatapointType
Definition: tuya.h:19
void control(float value) override
Definition: tuya_number.cpp:22
void set_write_multiply(float factor)
Definition: tuya_number.h:15
Base-class for all numbers.
Definition: number.h:39
void dump_config() override
Definition: tuya_number.cpp:33
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition: a01nyub.cpp:7
void set_tuya_parent(Tuya *parent)
Definition: tuya_number.h:17
void set_number_id(uint8_t number_id)
Definition: tuya_number.h:14