Display Daily Energy Metrics
This commit is contained in:
@@ -152,6 +152,18 @@ sensor:
|
|||||||
id: balcony_solar_power
|
id: balcony_solar_power
|
||||||
entity_id: sensor.balkonkraftwerk_power
|
entity_id: sensor.balkonkraftwerk_power
|
||||||
internal: true
|
internal: true
|
||||||
|
- platform: homeassistant
|
||||||
|
id: solar_energy_daily
|
||||||
|
entity_id: sensor.energy_solar_daily
|
||||||
|
internal: true
|
||||||
|
- platform: homeassistant
|
||||||
|
id: grid_import_energy_daily
|
||||||
|
entity_id: sensor.energy_import_daily
|
||||||
|
internal: true
|
||||||
|
- platform: homeassistant
|
||||||
|
id: grid_export_energy_daily
|
||||||
|
entity_id: sensor.energy_export_daily
|
||||||
|
internal: true
|
||||||
- platform: wireguard
|
- platform: wireguard
|
||||||
latest_handshake:
|
latest_handshake:
|
||||||
name: 'WireGuard Latest Handshake'
|
name: 'WireGuard Latest Handshake'
|
||||||
@@ -248,12 +260,33 @@ display:
|
|||||||
"-- W");
|
"-- W");
|
||||||
}
|
}
|
||||||
|
|
||||||
it.printf(12, 99, id(font_small), Color::WHITE, "Balkonkraftwerk");
|
|
||||||
|
if (id(grid_import_energy_daily).has_state()) {
|
||||||
|
it.printf(12, 96, id(font_small), Color::WHITE, "Bezug: %.2f kWh",
|
||||||
|
id(grid_import_energy_daily).state);
|
||||||
|
} else {
|
||||||
|
it.printf(12, 96, id(font_small), Color::WHITE, "Bezug: -- kWh");
|
||||||
|
}
|
||||||
|
if (id(grid_export_energy_daily).has_state()) {
|
||||||
|
it.printf(12, 116, id(font_small), Color::WHITE, "Einspeisung: %.2f kWh",
|
||||||
|
id(grid_export_energy_daily).state);
|
||||||
|
} else {
|
||||||
|
it.printf(12, 116, id(font_small), Color::WHITE, "Einspeisung: -- kWh");
|
||||||
|
}
|
||||||
|
|
||||||
|
it.printf(12, 138, id(font_small), Color::WHITE, "Balkonkraftwerk");
|
||||||
|
// Daily solar energy is aligned to the left of the current solar-power reading.
|
||||||
|
if (id(solar_energy_daily).has_state()) {
|
||||||
|
it.printf(12, 180, id(font_small), Color(255, 215, 0), "Solar: %.2f kWh",
|
||||||
|
id(solar_energy_daily).state);
|
||||||
|
} else {
|
||||||
|
it.printf(12, 180, id(font_small), Color(255, 215, 0), "Solar: -- kWh");
|
||||||
|
}
|
||||||
if (id(balcony_solar_power).has_state()) {
|
if (id(balcony_solar_power).has_state()) {
|
||||||
it.printf(308, 119, id(font_value), Color(255, 215, 0), TextAlign::TOP_RIGHT,
|
it.printf(308, 158, id(font_value), Color(255, 215, 0), TextAlign::TOP_RIGHT,
|
||||||
"%.0f W", id(balcony_solar_power).state);
|
"%.0f W", id(balcony_solar_power).state);
|
||||||
} else {
|
} else {
|
||||||
it.printf(308, 129, id(font_value), Color(255, 215, 0), TextAlign::TOP_RIGHT,
|
it.printf(308, 168, id(font_value), Color(255, 215, 0), TextAlign::TOP_RIGHT,
|
||||||
"-- W");
|
"-- W");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user