[core] Optimize and normalize entity state publishing logs with >> format (#13236)
This commit is contained in:
1 parent
3c63ff5e36
commit
0b5a3506cc
19 files changed
+23
-23
No files matched your search
@@ -126,8 +126,8 @@ float Sensor::get_raw_state() const { return this->raw_state; }
|
||||
void Sensor::internal_send_state_to_frontend(float state) {
|
||||
this->set_has_state(true);
|
||||
this->state = state;
|
||||
ESP_LOGD(TAG, "'%s': Sending state %.5f %s with %d decimals of accuracy", this->get_name().c_str(), state,
|
||||
this->get_unit_of_measurement_ref().c_str(), this->get_accuracy_decimals());
|
||||
ESP_LOGD(TAG, "'%s' >> %.*f %s", this->get_name().c_str(), std::max(0, (int) this->get_accuracy_decimals()), state,
|
||||
this->get_unit_of_measurement_ref().c_str());
|
||||
this->callback_.call(state);
|
||||
#if defined(USE_SENSOR) && defined(USE_CONTROLLER_REGISTRY)
|
||||
ControllerRegistry::notify_sensor_update(this);
|
||||
|
||||
Reference in new issue
Block a user