mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-28 17:12:32 +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:
parent
247eb07d64
commit
68da8414c9
@ -32,6 +32,7 @@
|
|||||||
#
|
#
|
||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
#
|
#
|
||||||
|
# 30.12.2018 Added standardized Reading batteryState
|
||||||
# 29.03.2018 Summary for Commandref
|
# 29.03.2018 Summary for Commandref
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
@ -201,8 +202,9 @@ TRX_SECURITY_Set($@)
|
|||||||
if ($sensor ne "none") { readingsBulkUpdate($hash, $sensor, $command); }
|
if ($sensor ne "none") { readingsBulkUpdate($hash, $sensor, $command); }
|
||||||
|
|
||||||
# Set battery
|
# Set battery
|
||||||
$sensor = "battery";
|
#$sensor = "battery";
|
||||||
readingsBulkUpdate($hash, $sensor, "ok");
|
readingsBulkUpdate($hash, "battery", "ok");
|
||||||
|
readingsBulkUpdate($hash, "batteryState", "ok");
|
||||||
|
|
||||||
readingsEndUpdate($hash, 1);
|
readingsEndUpdate($hash, 1);
|
||||||
}
|
}
|
||||||
@ -507,7 +509,8 @@ sub TRX_SECURITY_parse_X10Sec($$) {
|
|||||||
$current = "Error";
|
$current = "Error";
|
||||||
$current = "ok" if ($battery eq "batt_ok");
|
$current = "ok" if ($battery eq "batt_ok");
|
||||||
$current = "low" if ($battery eq "batt_low");
|
$current = "low" if ($battery eq "batt_low");
|
||||||
readingsBulkUpdate($def, $sensor, $current);
|
readingsBulkUpdate($def, "battery", $current);
|
||||||
|
readingsBulkUpdate($def, "batteryState", $current);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($rssi ne "") {
|
if ($rssi ne "") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user