mirror of
https://github.com/alexreinert/homematic_check_mk.git
synced 2023-10-10 13:37:02 +02:00
Fixed some regascript issues when Gewerk Monitored does not exist
This commit is contained in:
parent
c12aa0652d
commit
13d1e92fac
@ -106,7 +106,7 @@ proc get_homematic_check_result { } {
|
||||
|
||||
foreach (_svcId, dom.GetObject(ID_SERVICES).EnumUsedIDs()) {
|
||||
_svc = dom.GetObject(_svcId);
|
||||
if (_svc.AlState() == asOncoming) {
|
||||
if (_svc && _svc.AlState() == asOncoming) {
|
||||
_dp = dom.GetObject(_svc.AlTriggerDP());
|
||||
_ch = dom.GetObject(_dp.Channel());
|
||||
_dev = dom.GetObject(_ch.Device());
|
||||
@ -115,7 +115,9 @@ proc get_homematic_check_result { } {
|
||||
}
|
||||
}
|
||||
|
||||
foreach (_chId, dom.GetObject("Monitored").EnumUsedIDs()) {
|
||||
_svc = dom.GetObject("Monitored");
|
||||
if (_svc) {
|
||||
foreach (_chId, _svc.EnumUsedIDs()) {
|
||||
_ch = dom.GetObject(_chId);
|
||||
|
||||
_dev = dom.GetObject(_ch.Device());
|
||||
@ -130,6 +132,7 @@ proc get_homematic_check_result { } {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}]
|
||||
return $result(STDOUT)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user