Deactivate bargraph after BLE disconnect

This commit is contained in:
2026-05-28 12:29:52 +02:00
parent e2eb886eef
commit 2dbdfd213c
2 changed files with 2 additions and 2 deletions
-1
View File
@@ -13,4 +13,3 @@ home-assistant.log*
zigbee.db*
*__pycache__*
.ha_run.lock
+2 -1
View File
@@ -408,7 +408,8 @@ class Meter {
std::string unit_line = std::string(this->scale()) + this->unit();
it.print(270, 140, font, yellow, esphome::display::TextAlign::CENTER, unit_line.c_str());
this->draw_bargraph_(it, this->has_reading && !this->overload ? this->digits_from_buffer_() : 0, this->has_reading && !this->overload);
bool bargraph_active = this->connected && this->has_reading && !this->overload;
this->draw_bargraph_(it, bargraph_active ? this->digits_from_buffer_() : 0, bargraph_active);
this->draw_icon_(it, 300, 148, 16, 16, DIODE_BMP, this->diode() ? magenta : inactive);
this->draw_icon_(it, 300, 174, 16, 16, BUZZ_BMP, this->continuity() ? orange : inactive);