From 78b5731bbf4f97c79bc868ff781f851232f8da5b Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 7 Aug 2022 20:20:17 +0200 Subject: [PATCH] [fix] - cast all propertie as string - fixed bulkupdateifchanged --- CHANGED | 2 +- FHEM/74_GardenaSmartDevice.pm | 6 +++--- controls_GardenaSmartDevice.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGED b/CHANGED index 10ab08b..a171be1 100644 --- a/CHANGED +++ b/CHANGED @@ -1 +1 @@ - [enhancement] - delete unused scheuldes from readings + [fix] - delete unused schedules diff --git a/FHEM/74_GardenaSmartDevice.pm b/FHEM/74_GardenaSmartDevice.pm index 79db63f..8e15369 100644 --- a/FHEM/74_GardenaSmartDevice.pm +++ b/FHEM/74_GardenaSmartDevice.pm @@ -708,7 +708,7 @@ sub WriteReadings { $hash, $decode_json->{abilities}[$abilities]{name} . '-' . $propertie->{name}, - (defined ($propertie->{value} ) eq '') ? RigReadingsValue( $hash, 'n/a') : RigReadingsValue( $hash, $propertie->{value} ) + (defined ($propertie->{value} ) eq '') ? RigReadingsValue( $hash, 'n/a') : "".RigReadingsValue( $hash, $propertie->{value} ) # cast all data to string with "" ) if ( exists( $propertie->{value} ) && $decode_json->{abilities}[$abilities]{name} . '-' @@ -735,7 +735,7 @@ sub WriteReadings { $hash, $decode_json->{abilities}[$abilities]{name} . '-' . $propertie->{name}, - RigReadingsValue( $hash, $propertie->{value} ) + "".RigReadingsValue( $hash, $propertie->{value} ) # cast all data to string with "" ) if ( defined( $propertie->{value} ) @@ -762,7 +762,7 @@ sub WriteReadings { $decode_json->{abilities}[$abilities]{name} . '-' . $propertie->{name} . '_timestamp', - Time::Piece->strptime( + "".Time::Piece->strptime( RigReadingsValue( $hash, $propertie->{timestamp} ), "%Y-%m-%d %H:%M:%S" )->strftime('%s') diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index 041545f..843e6c1 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ UPD 2022-07-21_19:43:48 49634 FHEM/73_GardenaSmartBridge.pm -UPD 2022-08-06_20:17:48 107633 FHEM/74_GardenaSmartDevice.pm +UPD 2022-08-07_20:12:20 107711 FHEM/74_GardenaSmartDevice.pm