mirror of
https://github.com/nekorevend/esphome-emporia-vue-utility.git
synced 2026-01-10 05:10:40 -07:00
Solved incessant update() call rate.
This commit is contained in:
@@ -16,11 +16,7 @@ void EmporiaVueUtility::setup() {
|
||||
}
|
||||
|
||||
void EmporiaVueUtility::update() {
|
||||
// This seems to be called incessantly instead of at the set update
|
||||
// interval...
|
||||
|
||||
//ESP_LOGD(TAG, "Got update call with an instructed interval of
|
||||
// %d sec", this->update_interval_);
|
||||
// TODO: Use this to return value updates.
|
||||
}
|
||||
|
||||
void EmporiaVueUtility::loop() {
|
||||
@@ -160,6 +156,7 @@ void EmporiaVueUtility::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, " MGM Firmware Version: %d", this->mgm_firmware_ver);
|
||||
ESP_LOGCONFIG(TAG, " MGM MAC Address: %s", this->mgm_mac_address);
|
||||
ESP_LOGCONFIG(TAG, " MGM Install Code: %s (secret)", this->mgm_install_code);
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
}
|
||||
} // namespace emporia_vue_utility
|
||||
} // namespace esphome
|
||||
@@ -131,6 +131,7 @@ class EmporiaVueUtility : public PollingComponent, public uart::UARTDevice {
|
||||
uint16_t cost_unit = 0;
|
||||
|
||||
void set_update_interval(uint32_t update_interval) {
|
||||
PollingComponent::set_update_interval(update_interval);
|
||||
update_interval_ = update_interval / 1000;
|
||||
}
|
||||
void set_power_sensor(sensor::Sensor *sensor) { power_sensor_ = sensor; }
|
||||
|
||||
Reference in New Issue
Block a user