Add Number entities (from Home Assistant) (#1971)
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
This commit is contained in:
1 parent
1f5c79bd17
commit
dd37a4e04c
36 files changed
+1206
No files matched your search
@@ -53,6 +53,12 @@ void Controller::setup_controller() {
|
||||
obj->add_on_state_callback([this, obj]() { this->on_climate_update(obj); });
|
||||
}
|
||||
#endif
|
||||
#ifdef USE_NUMBER
|
||||
for (auto *obj : App.get_numbers()) {
|
||||
if (!obj->is_internal())
|
||||
obj->add_on_state_callback([this, obj](float state) { this->on_number_update(obj, state); });
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace esphome
|
||||
Reference in new issue
Block a user