From ede70899edf084de289241b724611c9b8984fedc Mon Sep 17 00:00:00 2001 From: wrfz <77174685+wrfz@users.noreply.github.com> Date: Fri, 15 Nov 2024 10:22:57 +0100 Subject: [PATCH] Add Fehlercode Sensor --- README.md | 2 ++ dist/hpsu-dashboard-card.js | 13 +++++++++---- dist/hpsu.svg | 22 ++++++++++++++-------- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 09970f5..3e1fee1 100644 --- a/README.md +++ b/README.md @@ -55,4 +55,6 @@ Erstelle als nächstes ein hpsu-dashboard-card als ein Fullscreen - **Panel** mi betriebsmodus: select.hpsu_can_betriebsmodus thermische_leistung: sensor.hpsu_can_thermische_leistung betriebsart: sensor.hpsu_can_betriebsart + heissgas: sensor.hpsu_uart_temperatur_nach_k_ltemittelverdichter + fehlercode: sensor.hpsu_can_fehlercode diff --git a/dist/hpsu-dashboard-card.js b/dist/hpsu-dashboard-card.js index 8735ca6..7a77e95 100644 --- a/dist/hpsu-dashboard-card.js +++ b/dist/hpsu-dashboard-card.js @@ -27,9 +27,10 @@ const entities_configuration = [ { id: "speicher_soll", label: "Speicher Soll", type: "select", rectId: "speicher_soll_value", offset: 6, unit: "°C" }, { id: "mischer", label: "Mischer", type: "sensor", rectId: "dhw_mixer_value", offset: 6, unit: "%", fontSize: "40px" }, { id: "bypass", label: "Bypass", type: "sensor", rectId: "bypass_value", offset: 6, unit: "%", fontSize: "40px" }, - { id: "betriebsmodus", label: "Betriebsmodus", type: "select", rectId: "info_1", offset: 6, fontSize: "40px", align: "left", "suffix": "Modus: " }, - { id: "betriebsart", label: "Betriebsart", type: "text_sensor", rectId: "info_2", offset: 6, fontSize: "40px", align: "left", "suffix": "Betriebsart: " }, - { id: "thermische_leistung", label: "Thermische Leistung", type: "sensor", rectId: "info_3", offset: 6, fontSize: "40px", align: "left", "suffix": "Therm. Leistung: " } + { id: "betriebsmodus", label: "Betriebsmodus", type: "select", rectId: "betriebsmodus_value", offset: 6, fontSize: "40px", align: "left", "suffix": "Modus: " }, + { id: "betriebsart", label: "Betriebsart", type: "text_sensor", rectId: "betriebsart_value", offset: 6, fontSize: "40px", align: "left", "suffix": "Betriebsart: " }, + { id: "thermische_leistung", label: "Thermische Leistung", type: "sensor", rectId: "therm_leistung_value", offset: 6, fontSize: "40px", align: "left", "suffix": "Therm. Leistung: " }, + { id: "fehlercode", label: "Fehlercode", type: "text_sensor", rectId: "fehlercode_value", offset: 6, fontSize: "40px", align: "left", "suffix": "Fehlercode: " } ]; ////////////////////////////////////////////////////////////////// @@ -252,7 +253,11 @@ class HPSUDashboardCard extends HTMLElement { } state.labelElement.textContent = `${entityState} ${unit}`; - state.labelElement.setAttribute("fill", "silver"); + if (state.id == "fehlercode" && entityState != "Fehlercode: Kein Fehler") { + state.labelElement.setAttribute("fill", "red"); + } else { + state.labelElement.setAttribute("fill", "silver"); + } } } diff --git a/dist/hpsu.svg b/dist/hpsu.svg index 6752f3b..9424e69 100644 --- a/dist/hpsu.svg +++ b/dist/hpsu.svg @@ -21,15 +21,15 @@ inkscape:pageopacity="0.0" inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1" - inkscape:zoom="0.32" - inkscape:cx="1551.5625" - inkscape:cy="432.8125" + inkscape:zoom="0.90509668" + inkscape:cx="2063.8679" + inkscape:cy="1168.3835" inkscape:window-width="1920" inkscape:window-height="1129" inkscape:window-x="-8" inkscape:window-y="-8" inkscape:window-maximized="1" - inkscape:current-layer="Ruecklauf" + inkscape:current-layer="layer1" showgrid="false" />