RegisterPropertyFloat("Price",0.23); $this->ReadPropertyString("Counters",""); $this->RegisterVariableString("htmlOutput", "Zählerübersicht",["PRESENTATION"=> VARIABLE_PRESENTATION_LEGACY, "PROFILE" => "~HTMLBox"],0); } // Überschreibt die intere IPS_ApplyChanges($id) Funktion public function ApplyChanges() { // Diese Zeile nicht löschen parent::ApplyChanges(); $this->checkTable(); } public function RequestAction($Ident, $Value) { $varid = $this->GetIDForIdent($Ident); SetValue($varid, $Value); } public function checkTable(){ $Idvalue = $this->ReadPropertyFloat("Price"); $arrString = $this->ReadPropertyString("Counters"); $arr = json_decode($arrString); print_r($arr); /* ' Gesamt '.$ZaehlerGesamtGesamt.' '.$ZaehlerGesamtMonat.' '.$GrenzeZaehlerGesamt.' kWh '.$ZaehlerGesamtTag.' '.$KostenGesamt.'€ ' */ } public function createTable($data) { $htmlprefix =' '; $htmlsuffix = '
Gesamt: Monat: Monatsgerenze: Heute: Kosten:
Gesamt '.$ZaehlerGesamtGesamt.' '.$ZaehlerGesamtMonat.' '.$GrenzeZaehlerGesamt.' kWh '.$ZaehlerGesamtTag.' '.$KostenGesamt.'€
'; SetValueString($this->GetIDForIdent("htmlOutput"),$htmlprefix.$data.$htmlsuffix); } } ?>