mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-10 14:50:40 +02:00
feat: add solar return energy to home assistant
This commit is contained in:
parent
748d5a4bf3
commit
5160f3a53e
2 changed files with 22 additions and 0 deletions
|
@ -47,6 +47,7 @@
|
|||
];
|
||||
}
|
||||
];
|
||||
|
||||
template = [
|
||||
{
|
||||
sensor = [
|
||||
|
|
|
@ -43,6 +43,7 @@ in
|
|||
enable = true;
|
||||
extraComponents = [
|
||||
"esphome"
|
||||
"forecast_solar"
|
||||
"fritzbox"
|
||||
"matter"
|
||||
"met"
|
||||
|
@ -160,6 +161,26 @@ in
|
|||
types = [ "Papiermüll" ];
|
||||
}
|
||||
];
|
||||
|
||||
template = [
|
||||
{
|
||||
sensor = [
|
||||
{
|
||||
name = "Total Grid Return Energy";
|
||||
unique_id = "calculated_total_grid_return_energy";
|
||||
device_class = "energy";
|
||||
unit_of_measurement = "kWh";
|
||||
state_class = "total_increasing";
|
||||
state = ''
|
||||
{% set solar = states('sensor.pro3em_solar_total_active_energy') | float(0) %}
|
||||
{% set mains = states('sensor.pro3em_mains_total_active_energy') | float(0) %}
|
||||
{% set export = solar - mains %}
|
||||
{{ [export, 0] | max }}
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
extraPackages =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue