percentage Reading fix comma character
This commit is contained in:
parent
56a1f3700e
commit
c45a6958f8
@ -66,7 +66,7 @@ use HttpUtils;
|
||||
eval "use JSON;1" or $missingModul .= "JSON ";
|
||||
|
||||
|
||||
my $version = "0.0.18";
|
||||
my $version = "0.0.21";
|
||||
|
||||
|
||||
|
||||
@ -231,6 +231,10 @@ sub TeslaPowerwall2AC_Get($@) {
|
||||
} elsif( $cmd eq 'powerwalls' ) {
|
||||
|
||||
$arg = lc($cmd);
|
||||
|
||||
} elsif( $cmd eq 'sitemaster' ) {
|
||||
|
||||
$arg = lc($cmd);
|
||||
|
||||
} else {
|
||||
|
||||
@ -419,7 +423,8 @@ sub TeslaPowerwall2AC_WriteReadings($$$) {
|
||||
|
||||
readingsBeginUpdate($hash);
|
||||
while( my ($r,$v) = each %{$readings} ) {
|
||||
readingsBulkUpdateIfChanged($hash,$path.'-'.$r,$v);
|
||||
readingsBulkUpdate($hash,$path.'-'.$r,$v);
|
||||
readingsBulkUpdate($hash,$path.'-'.$r,sprintf("%.1f",$v) if($r eq 'percentage');
|
||||
}
|
||||
|
||||
readingsBulkUpdateIfChanged($hash,'state','ready');
|
||||
|
Loading…
x
Reference in New Issue
Block a user