From a294b267684a74cd2ff83e9a7c2c391072b656ba Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Fri, 5 Mar 2021 10:18:08 +0100 Subject: [PATCH] remove hash ref check --- FHEM/46_TeslaPowerwall2AC.pm | 28 ++++++++++++++-------------- controls_TeslaPowerwall2AC.txt | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/FHEM/46_TeslaPowerwall2AC.pm b/FHEM/46_TeslaPowerwall2AC.pm index fa96361..007cd3d 100644 --- a/FHEM/46_TeslaPowerwall2AC.pm +++ b/FHEM/46_TeslaPowerwall2AC.pm @@ -726,19 +726,19 @@ sub ReadingsProcessing_Powerwalls { $readings{ 'wall_' . $i . '_' . $r } = $v if ( ref($v) ne 'HASH' ); - if ( ref($v) eq 'HASH' ) { - while ( my ( $s, $ts ) = each %{$v} ) { - if ( ref( $ts ) eq 'ARRAY' - && scalar( @{ $ts } ) > 0 ) - { - my $j = 0; - for my $t ( @{ $ts } ) { - $readings{ 'wall_' . $i . '_' . $r . '_' . $s . '_' . $j } = $t; - $j++; - } - } - } - } +# if ( ref($v) eq 'HASH' ) { +# while ( my ( $s, $ts ) = each %{$v} ) { +# if ( ref( $ts ) eq 'ARRAY' +# && scalar( @{ $ts } ) > 0 ) +# { +# my $j = 0; +# for my $t ( @{ $ts } ) { +# $readings{ 'wall_' . $i . '_' . $r . '_' . $s . '_' . $j } = $t; +# $j++; +# } +# } +# } +# } } $i++; @@ -1096,7 +1096,7 @@ sub Rename { ], "release_status": "stable", "license": "GPL_2", - "version": "v1.0.4", + "version": "v1.0.5", "author": [ "Marko Oldenburg " ], diff --git a/controls_TeslaPowerwall2AC.txt b/controls_TeslaPowerwall2AC.txt index 24e0f6e..3a54f37 100644 --- a/controls_TeslaPowerwall2AC.txt +++ b/controls_TeslaPowerwall2AC.txt @@ -1 +1 @@ -UPD 2021-03-02_18:52:33 31370 FHEM/46_TeslaPowerwall2AC.pm +UPD 2021-03-05_10:17:54 31396 FHEM/46_TeslaPowerwall2AC.pm