mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-01 01:09:47 +00:00
10_ZWave.pm: tweak batteryState and batteryPercent (Forum #110964)
git-svn-id: https://svn.fhem.de/fhem/trunk@21903 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
dc11d5dda2
commit
dc7169bd97
@ -3331,9 +3331,9 @@ ZWave_battery($) # Forum #87575
|
||||
my ($val) = @_;
|
||||
my @ret;
|
||||
|
||||
push @ret, "battery:".($val eq "ff" ? "low":hex($val)." %");
|
||||
push @ret, "batteryState:".($val eq "ff" ? "low":"ok");
|
||||
push @ret, "batteryPercent:".hex($val) if($val ne "ff");
|
||||
push @ret, "battery:". ($val eq "ff" ? "low" : hex($val)." %");
|
||||
push @ret, "batteryState:" .(($val eq "ff" || $val eq "00") ? "low":"ok");
|
||||
push @ret, "batteryPercent:".($val eq "ff" ? 0 : hex($val)); #110964
|
||||
return @ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user