From 12888c2ceef76067b2ae87d74d32ee475e757753 Mon Sep 17 00:00:00 2001 From: justme-1968 Date: Tue, 16 Apr 2019 19:16:57 +0000 Subject: [PATCH] 31_HUEDevice.pm: added Xiaomi Aqara Vibrationsensor (lumi.vibration.aq1) git-svn-id: https://svn.fhem.de/fhem/trunk@19201 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/31_HUEDevice.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fhem/FHEM/31_HUEDevice.pm b/fhem/FHEM/31_HUEDevice.pm index 5acafb1ee..82aca7bba 100644 --- a/fhem/FHEM/31_HUEDevice.pm +++ b/fhem/FHEM/31_HUEDevice.pm @@ -1247,6 +1247,9 @@ HUEDevice_Parse($$) $readings{battery} = $config->{battery} if( defined($config->{battery}) ); $readings{reachable} = $config->{reachable} if( defined($config->{reachable}) ); $readings{temperature} = $config->{temperature} * 0.01 if( defined($config->{temperature}) ); + + #Xiaomi Aqara Vibrationsensor (lumi.vibration.aq1) + $hash->{sensitivitymax} = $config->{sensitivitymax} if( defined ($config->{sensitivitymax}) ); } my $lastupdated; @@ -1316,6 +1319,12 @@ HUEDevice_Parse($$) $readings{fire} = $state->{fire} if( defined($state->{fire}) ); $readings{tampered} = $state->{tampered} if( defined($state->{tampered}) ); $readings{batteryState} = $state->{lowbattery}?'low':'ok' if( defined($state->{lowbattery}) ); + + #Xiaomi Aqara Vibrationsensor (lumi.vibration.aq1) + $readings{tiltangle} = $state->{tiltangle} if( defined ($state->{tiltangle}) ); + $readings{vibration} = $state->{vibration} if( defined ($state->{vibration}) ); + $readings{orientation} = join(',', @{$state->{orientation}}) if( defined($state->{orientation}) && ref($state->{orientation}) eq 'ARRAY' ); + $readings{vibrationstrength} = $state->{vibrationstrength} if( defined ($state->{vibrationstrength}) ); } if( scalar keys %readings ) {