add lona readings

This commit is contained in:
Sebastian 2022-05-27 11:44:59 +02:00
parent 234607cb8d
commit 40074a3db6
3 changed files with 21 additions and 9 deletions

View File

@ -1 +1 @@
fix lona
Reviewed-on: https://git.cooltux.net/FHEM/mod-GardenaSmart/pulls/58

View File

@ -776,13 +776,25 @@ sub WriteReadings {
if ( ref( $propertie->{value} ) eq "HASH" ) {
while ( my ( $r, $v ) = each %{ $propertie->{value} } ) {
readingsBulkUpdate(
$hash,
$decode_json->{abilities}[$abilities]{name} . '-'
^ if ( ref( $v ) ne "HASH" ) {
readingsBulkUpdate(
$hash,
$decode_json->{abilities}[$abilities]{name} . '-'
. $propertie->{name} . '_'
. $r,
RigReadingsValue( $hash, $v )
);
} else {
while ( my ( $i_r, $i_v ) = each %{ $v } ) {
readingsBulkUpdate(
$hash,
$decode_json->{abilities}[$abilities]{name} . '-'
. $propertie->{name} . '_'
. $r,
RigReadingsValue( $hash, $v )
);
. $r . '_' . $i_r,
RigReadingsValue( $hash, $i_v )
);
}
}
}
}
}

View File

@ -1,2 +1,2 @@
UPD 2022-05-17_20:53:29 49913 FHEM/73_GardenaSmartBridge.pm
UPD 2022-05-17_11:06:17 66211 FHEM/74_GardenaSmartDevice.pm
UPD 2022-05-27_11:41:32 49913 FHEM/73_GardenaSmartBridge.pm
UPD 2022-05-27_11:44:30 66807 FHEM/74_GardenaSmartDevice.pm