mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
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
This commit is contained in:
parent
e14051e2ec
commit
12888c2cee
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user