mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
46_TeslaPowerwall2AC.pm: new formula to calculate batteryPower
git-svn-id: https://svn.fhem.de/fhem/trunk@15311 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3e979a2d13
commit
cfbc5aea5a
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user