fixed set reading

This commit is contained in:
Philipp Wo 2019-12-09 21:27:58 +01:00
parent 1e9a31b5f4
commit 422db04e88
1 changed files with 1 additions and 1 deletions

View File

@ -929,7 +929,7 @@ sub TadoAPI_UpdateMobileReadingsCallback($){
foreach my $item ( @$decoded_data ){
readingsBeginUpdate($hash);
readingsBulkUpdate($hash, "GeoTracking_" . $item->{'id'}, $item->{'settings'}->{'geoTrackingEnabled'});
if(defined($item->{'location'}->{'atHome'}) && defined($item->{'location'}->{'atHome'}) eq "true"){
if(defined($item->{'location'}->{'atHome'}) && $item->{'location'}->{'atHome'} eq "true"){
# present
readingsBulkUpdate($hash, "GeoLocation_" . $item->{'id'}, "present");
}elsif(defined($item->{'location'}->{'atHome'})){