mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 08:55:22 +01:00
Code cleanup fixes for the number component (#3458)
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
This commit is contained in:
parent
62f9e181e0
commit
c569f5ddcf
2 changed files with 0 additions and 3 deletions
|
@ -33,7 +33,6 @@ class Number : public EntityBase {
|
||||||
void publish_state(float state);
|
void publish_state(float state);
|
||||||
|
|
||||||
NumberCall make_call() { return NumberCall(this); }
|
NumberCall make_call() { return NumberCall(this); }
|
||||||
void set(float value) { make_call().set_value(value).perform(); }
|
|
||||||
|
|
||||||
void add_on_state_callback(std::function<void(float)> &&callback);
|
void add_on_state_callback(std::function<void(float)> &&callback);
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,6 @@ class NumberCall {
|
||||||
void perform();
|
void perform();
|
||||||
|
|
||||||
NumberCall &set_value(float value);
|
NumberCall &set_value(float value);
|
||||||
const optional<float> &get_value() const { return value_; }
|
|
||||||
|
|
||||||
NumberCall &number_increment(bool cycle);
|
NumberCall &number_increment(bool cycle);
|
||||||
NumberCall &number_decrement(bool cycle);
|
NumberCall &number_decrement(bool cycle);
|
||||||
NumberCall &number_to_min();
|
NumberCall &number_to_min();
|
||||||
|
|
Loading…
Reference in a new issue