2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

46_TRX_SECURITY.pm: Added batteryState reading

git-svn-id: https://svn.fhem.de/fhem/trunk@18096 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
KernSani 2018-12-30 14:37:52 +00:00
parent 247eb07d64
commit 68da8414c9

View File

@ -32,6 +32,7 @@
#
# CHANGELOG
#
# 30.12.2018 Added standardized Reading batteryState
# 29.03.2018 Summary for Commandref
#
#
@ -201,9 +202,10 @@ TRX_SECURITY_Set($@)
if ($sensor ne "none") { readingsBulkUpdate($hash, $sensor, $command); }
# Set battery
$sensor = "battery";
readingsBulkUpdate($hash, $sensor, "ok");
#$sensor = "battery";
readingsBulkUpdate($hash, "battery", "ok");
readingsBulkUpdate($hash, "batteryState", "ok");
readingsEndUpdate($hash, 1);
}
@ -507,7 +509,8 @@ sub TRX_SECURITY_parse_X10Sec($$) {
$current = "Error";
$current = "ok" if ($battery eq "batt_ok");
$current = "low" if ($battery eq "batt_low");
readingsBulkUpdate($def, $sensor, $current);
readingsBulkUpdate($def, "battery", $current);
readingsBulkUpdate($def, "batteryState", $current);
}
if ($rssi ne "") {