2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

74_GardenaSmartDevice: little Bugfix, thanks Christoph

git-svn-id: https://svn.fhem.de/fhem/trunk@21793 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
LeonGaultier 2020-04-28 13:21:32 +00:00
parent 4fc08d0805
commit 8dbbbd1296

View File

@ -485,7 +485,7 @@ sub WriteReadings {
$hash, $hash,
$decode_json->{abilities}[$abilities]{name} . '-' $decode_json->{abilities}[$abilities]{name} . '-'
. $propertie->{name}, . $propertie->{name},
RigRadingsValue( $hash, $propertie->{value} ) RigReadingsValue( $hash, $propertie->{value} )
) )
if ( defined( $propertie->{value} ) if ( defined( $propertie->{value} )
&& $decode_json->{abilities}[$abilities]{name} . '-' && $decode_json->{abilities}[$abilities]{name} . '-'
@ -508,7 +508,7 @@ sub WriteReadings {
$hash, $hash,
$decode_json->{abilities}[$abilities]{name} . '-' $decode_json->{abilities}[$abilities]{name} . '-'
. $propertie->{name}, . $propertie->{name},
RigRadingsValue( $hash, $propertie->{value} ) RigReadingsValue( $hash, $propertie->{value} )
) )
if ( if (
defined( $propertie->{value} ) defined( $propertie->{value} )
@ -557,7 +557,7 @@ sub WriteReadings {
$decode_json->{abilities}[$abilities]{name} . '-' $decode_json->{abilities}[$abilities]{name} . '-'
. $propertie->{name} . '_' . $propertie->{name} . '_'
. $r, . $r,
RigRadingsValue( $hash, $v ) RigReadingsValue( $hash, $v )
); );
} }
} }
@ -606,9 +606,9 @@ sub WriteReadings {
readingsBulkUpdate( readingsBulkUpdate(
$hash, 'state', $hash, 'state',
( (
ReadingsVal( $name, 'watering-watering_timer_1_state', 0 ) eq 'idle' ReadingsVal( $name, 'watering-watering_timer_1_state', 'idle' ) eq 'idle'
? RigRadingsValue( $hash, 'closed' ) ? RigReadingsValue( $hash, 'closed' )
: RigRadingsValue( $hash, 'open' ) : RigReadingsValue( $hash, 'open' )
) )
) if ( AttrVal( $name, 'model', 'unknown' ) eq 'watering_computer' ); ) if ( AttrVal( $name, 'model', 'unknown' ) eq 'watering_computer' );
@ -770,7 +770,7 @@ sub ReadingLangGerman {
return; return;
} }
sub RigRadingsValue { sub RigReadingsValue {
my $hash = shift; my $hash = shift;
my $readingValue = shift; my $readingValue = shift;