mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
FULLY: Added support for sensor information
git-svn-id: https://svn.fhem.de/fhem/trunk@23354 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
750ffd843c
commit
70b4ccd996
@ -1,5 +1,6 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- feature: 89_FULLY: Added support for sensor information
|
||||
- bugfix: 98_weekprofile: HMCCU-HM send profile without prefix (Forum #1104569)
|
||||
- bugfix: 70_DENON_AVR: serial connection issues
|
||||
- feature: 77_SMAEM: attr serialNumber may contain multiple serial numbers
|
||||
|
@ -1,6 +1,6 @@
|
||||
##############################################################################
|
||||
#
|
||||
# 89_FULLY.pm 2.02
|
||||
# 89_FULLY.pm 2.1
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
@ -40,7 +40,7 @@ sub FULLY_Decrypt ($);
|
||||
sub FULLY_Ping ($$);
|
||||
sub FULLY_SetPolling ($$;$);
|
||||
|
||||
my $FULLY_VERSION = '2.02';
|
||||
my $FULLY_VERSION = '2.1';
|
||||
|
||||
# Timeout for Fully requests
|
||||
my $FULLY_TIMEOUT = 5;
|
||||
@ -827,8 +827,20 @@ sub FULLY_UpdateReadings ($$)
|
||||
foreach my $rn (keys %$result) {
|
||||
my $key = lc($rn);
|
||||
next if (exists($readings{$key}) && $readings{$key} eq 'ignore');
|
||||
readingsBulkUpdate ($hash, $key, exists($readings{$key}) && $readings{$key} eq 'bool' ?
|
||||
($result->{$rn} eq '0' ? 'no' : 'yes') : $result->{$rn});
|
||||
if (ref($result->{$rn}) eq 'ARRAY') {
|
||||
if ($key eq 'sensorinfo') {
|
||||
foreach my $e (@{$result->{$rn}}) {
|
||||
$key = lc($e->{name});
|
||||
$key =~ s/ /_/g;
|
||||
my $rv = ref($e->{values}) eq 'ARRAY' ? join(',', @{$e->{values}}) : $e->{values};
|
||||
readingsBulkUpdate ($hash, $key, $rv);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
readingsBulkUpdate ($hash, $key, exists($readings{$key}) && $readings{$key} eq 'bool' ?
|
||||
($result->{$rn} eq '0' ? 'no' : 'yes') : $result->{$rn});
|
||||
}
|
||||
}
|
||||
|
||||
my $screenOn = $result->{isScreenOn} // $result->{screenOn};
|
||||
|
Loading…
Reference in New Issue
Block a user