Deactivate bargraph after BLE disconnect
This commit is contained in:
@@ -13,4 +13,3 @@ home-assistant.log*
|
|||||||
zigbee.db*
|
zigbee.db*
|
||||||
*__pycache__*
|
*__pycache__*
|
||||||
.ha_run.lock
|
.ha_run.lock
|
||||||
|
|
||||||
|
|||||||
@@ -408,7 +408,8 @@ class Meter {
|
|||||||
std::string unit_line = std::string(this->scale()) + this->unit();
|
std::string unit_line = std::string(this->scale()) + this->unit();
|
||||||
it.print(270, 140, font, yellow, esphome::display::TextAlign::CENTER, unit_line.c_str());
|
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, 148, 16, 16, DIODE_BMP, this->diode() ? magenta : inactive);
|
||||||
this->draw_icon_(it, 300, 174, 16, 16, BUZZ_BMP, this->continuity() ? orange : inactive);
|
this->draw_icon_(it, 300, 174, 16, 16, BUZZ_BMP, this->continuity() ? orange : inactive);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user