added yearly Energy and costs

This commit is contained in:
jhartworks committed 2026-10-21 13:23:40 +02:00
1 parent ac0621ffe4
commit 989d58ad1a
8 files changed
+54 -12

No files matched your search

+10
View File
@@ -38,6 +38,16 @@
"type": "CheckBox",
"name": "ShowMonthCost",
"caption": "Show monthly cost"
},
{
"type": "CheckBox",
"name": "ShowYearEnergy",
"caption": "Show yearly energy"
},
{
"type": "CheckBox",
"name": "ShowYearCost",
"caption": "Show yearly cost"
}
]
}
+5 -1
View File
@@ -11,12 +11,16 @@
"Show daily cost": "Tageskosten anzeigen",
"Show monthly energy": "Monatsenergie anzeigen",
"Show monthly cost": "Monatskosten anzeigen",
"Show yearly energy": "Jahresenergie anzeigen",
"Show yearly cost": "Jahreskosten anzeigen",
"Total Energy": "Gesamtenergie",
"Total Cost": "Gesamtkosten",
"Daily Energy": "Tagesenergie",
"Daily Cost": "Tageskosten",
"Monthly Energy": "Monatsenergie",
"Monthly Cost": "Monatskosten"
"Monthly Cost": "Monatskosten",
"Yearly Energy": "Jahresenergie",
"Yearly Cost": "Jahreskosten"
}
}
}
+7 -1
View File
@@ -21,6 +21,8 @@ class EnergyCounterChild extends IPSModule
$this->RegisterPropertyBoolean('ShowDayCost', true);
$this->RegisterPropertyBoolean('ShowMonthEnergy', true);
$this->RegisterPropertyBoolean('ShowMonthCost', true);
$this->RegisterPropertyBoolean('ShowYearEnergy', true);
$this->RegisterPropertyBoolean('ShowYearCost', true);
$this->EnsureProfiles();
$this->RegisterValueVariables();
@@ -63,6 +65,8 @@ class EnergyCounterChild extends IPSModule
$this->RegisterVariableFloat('DayCost', $this->Translate('Daily Cost'), self::COST_PROFILE, 40);
$this->RegisterVariableFloat('MonthEnergy', $this->Translate('Monthly Energy'), self::ENERGY_PROFILE, 50);
$this->RegisterVariableFloat('MonthCost', $this->Translate('Monthly Cost'), self::COST_PROFILE, 60);
$this->RegisterVariableFloat('YearEnergy', $this->Translate('Yearly Energy'), self::ENERGY_PROFILE, 70);
$this->RegisterVariableFloat('YearCost', $this->Translate('Yearly Cost'), self::COST_PROFILE, 80);
}
private function ApplyVisibility()
@@ -73,7 +77,9 @@ class EnergyCounterChild extends IPSModule
'DayEnergy' => $this->ReadPropertyBoolean('ShowDayEnergy'),
'DayCost' => $this->ReadPropertyBoolean('ShowDayCost'),
'MonthEnergy' => $this->ReadPropertyBoolean('ShowMonthEnergy'),
'MonthCost' => $this->ReadPropertyBoolean('ShowMonthCost')
'MonthCost' => $this->ReadPropertyBoolean('ShowMonthCost'),
'YearEnergy' => $this->ReadPropertyBoolean('ShowYearEnergy'),
'YearCost' => $this->ReadPropertyBoolean('ShowYearCost')
];
foreach ($visibility as $ident => $visible) {