mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 19:04:20 +00:00
31_HUEDevice.pm: added batteryPercent reading, battery is deprecated and will be removed later
git-svn-id: https://svn.fhem.de/fhem/trunk@21480 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
dc74cb4243
commit
3c6c830bc5
@ -1,5 +1,7 @@
|
||||
# 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: 31_HUEDevice: added batteryPercent reading
|
||||
battery reading is deprecated, will be removed later
|
||||
- feature: 93_DbRep: add column header for custom selects (sqlCmd),
|
||||
new sqlSpecial readingsDifferenceByTimeDelta for MySQL,
|
||||
bugfix: FHEM crash if no time-attribute is set and time
|
||||
|
@ -1524,6 +1524,8 @@ HUEDevice_Parse($$)
|
||||
$hash->{sensitivity} = $config->{sensitivity} if( defined($config->{sensitivity}) );
|
||||
|
||||
$readings{battery} = $config->{battery} if( defined($config->{battery}) );
|
||||
$readings{batteryPercent} = $config->{battery} if( defined($config->{battery}) );
|
||||
|
||||
$readings{reachable} = $config->{reachable} if( defined($config->{reachable}) );
|
||||
$readings{temperature} = $config->{temperature} * 0.01 if( defined($config->{temperature}) );
|
||||
|
||||
@ -1597,6 +1599,7 @@ HUEDevice_Parse($$)
|
||||
$readings{fire} = $state->{fire} if( defined($state->{fire}) );
|
||||
$readings{tampered} = $state->{tampered} if( defined($state->{tampered}) );
|
||||
$readings{battery} = $state->{battery} if( defined($state->{battery}) );
|
||||
$readings{batteryPercent} = $state->{battery} if( defined($state->{battery}) );
|
||||
$readings{batteryState} = $state->{lowbattery}?'low':'ok' if( defined($state->{lowbattery}) );
|
||||
|
||||
#Xiaomi Aqara Vibrationsensor (lumi.vibration.aq1)
|
||||
@ -1772,6 +1775,7 @@ HUEDevice_Parse($$)
|
||||
if( defined($rgb) && $rgb ne $hash->{helper}{rgb} ) {readingsBulkUpdate($hash,"rgb",$rgb);}
|
||||
|
||||
if( defined($battery) && $battery ne $hash->{helper}{battery} ) {readingsBulkUpdate($hash,"battery",$battery);}
|
||||
if( defined($battery) && $battery ne $hash->{helper}{battery} ) {readingsBulkUpdate($hash,'batteryPercent',$battery);}
|
||||
|
||||
if( defined($mode) && $mode ne $hash->{helper}{mode} ) {readingsBulkUpdate($hash,"mode",$mode);}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user