diff --git a/fhem/CHANGED b/fhem/CHANGED index b2fda546e..0742980ca 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - update: 46_TeslaPowerwall2AC.pm: new formula to calculate batteryPower - new: 46_Aqicn.pm: new modul, fetch information about air quality by city name - bugfix: 82_LGTV_WebOS: 1.2.0 bugfix - hack for properly fhem freez after diff --git a/fhem/FHEM/46_TeslaPowerwall2AC.pm b/fhem/FHEM/46_TeslaPowerwall2AC.pm index 7d034206c..843063d4a 100644 --- a/fhem/FHEM/46_TeslaPowerwall2AC.pm +++ b/fhem/FHEM/46_TeslaPowerwall2AC.pm @@ -66,7 +66,7 @@ use HttpUtils; eval "use JSON;1" or $missingModul .= "JSON "; -my $version = "0.2.2"; +my $version = "0.2.3"; @@ -452,7 +452,7 @@ sub TeslaPowerwall2AC_WriteReadings($$$) { } readingsBulkUpdate($hash,'batteryLevel',sprintf("%.1f",$readings->{percentage})) if( defined($readings->{percentage}) ); - readingsBulkUpdate($hash,'batteryPower',sprintf("%.1f",$readings->{percentage}*0.135)) if( defined($readings->{percentage}) ); + readingsBulkUpdate($hash,'batteryPower',sprintf("%.1f",(ReadingsVal($name,'siteinfo-nominal_system_energy_kWh',0)/100) * ReadingsVal($name,'statussoe-percentage',0) ) ); readingsBulkUpdateIfChanged($hash,'actionQueue',scalar(@{$hash->{actionQueue}}) . ' entries in the Queue'); readingsBulkUpdateIfChanged($hash,'state',(defined($hash->{actionQueue}) and scalar(@{$hash->{actionQueue}}) == 0 ? 'ready' : 'fetch data - ' . scalar(@{$hash->{actionQueue}}) . ' paths in actionQueue')); readingsEndUpdate($hash,1);