Skip to content

Commit

Permalink
Add Fehlercode Sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
wrfz committed Nov 15, 2024
1 parent c63d2dc commit ede7089
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

13 changes: 9 additions & 4 deletions dist/hpsu-dashboard-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: " }
];

//////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -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");
}
}
}

Expand Down
22 changes: 14 additions & 8 deletions dist/hpsu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ede7089

Please sign in to comment.