From fef2a378c0d67f1dc390db5c6bcabfcd5bd0eb90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Bo=CC=88hm?= Date: Wed, 15 Jan 2025 21:44:30 +0100 Subject: [PATCH] Feature: show mqtt battery live view card Always show mqtt battery live view card as it provides the data age --- include/BatteryStats.h | 2 -- src/BatteryStats.cpp | 9 --------- 2 files changed, 11 deletions(-) diff --git a/include/BatteryStats.h b/include/BatteryStats.h index cfce8ea88..991a5b975 100644 --- a/include/BatteryStats.h +++ b/include/BatteryStats.h @@ -348,7 +348,5 @@ class MqttBatteryStats : public BatteryStats { // we do NOT publish the same data under a different topic. void mqttPublish() const final { } - void getLiveViewData(JsonVariant& root) const final; - bool supportsAlarmsAndWarnings() const final { return false; } }; diff --git a/src/BatteryStats.cpp b/src/BatteryStats.cpp index f4e383b29..8201b31fe 100644 --- a/src/BatteryStats.cpp +++ b/src/BatteryStats.cpp @@ -109,15 +109,6 @@ void BatteryStats::getLiveViewData(JsonVariant& root) const root["showIssues"] = supportsAlarmsAndWarnings(); } -void MqttBatteryStats::getLiveViewData(JsonVariant& root) const -{ - // as we don't want to repeat the data that is already shown in the live data card - // we only add the live view data here when the discharge current limit can be shown - if (isDischargeCurrentLimitValid()) { - BatteryStats::getLiveViewData(root); - } -} - void PylontechBatteryStats::getLiveViewData(JsonVariant& root) const { BatteryStats::getLiveViewData(root);