mirror of
https://github.com/esphome/esphome.git
synced 2025-09-19 11:42:20 +01:00
Sun support (#531)
* Sun * Add sun support * Lint * Updates * Fix elevation * Lint * Update mqtt_climate.cpp
This commit is contained in:
@@ -88,10 +88,8 @@ std::string Sensor::unique_id() { return ""; }
|
||||
void Sensor::internal_send_state_to_frontend(float state) {
|
||||
this->has_state_ = true;
|
||||
this->state = state;
|
||||
if (this->filter_list_ != nullptr) {
|
||||
ESP_LOGD(TAG, "'%s': Sending state %.5f %s with %d decimals of accuracy", this->get_name().c_str(), state,
|
||||
this->get_unit_of_measurement().c_str(), this->get_accuracy_decimals());
|
||||
}
|
||||
ESP_LOGD(TAG, "'%s': Sending state %.5f %s with %d decimals of accuracy", this->get_name().c_str(), state,
|
||||
this->get_unit_of_measurement().c_str(), this->get_accuracy_decimals());
|
||||
this->callback_.call(state);
|
||||
}
|
||||
bool Sensor::has_state() const { return this->has_state_; }
|
||||
|
Reference in New Issue
Block a user