Finally got a chance to look at the actual code; the relevant portions (still present in 2022.160.19) is and the failure occurs in the elif apparently for nonBLE devices that are not sensors:
- Code: Select all
if dev.deviceTypeId in ["rPI","rPI-Sensor","beacon","BLEconnect"]:
for xx in _GlobalConst_groupListDef:
if xx == "SENSOR": continue
if dev.states["note"].lower().find(xx.lower()) >-1:
if dev.states["status"] == "up":
self.groupStatusList[xx]["nHome"] +=1
triggerGroup[xx]["oneHome"] = True
else:
self.groupStatusList[xx]["nAway"] +=1
triggerGroup[xx]["oneHome"] = False
okList.append("{}".format(dev.id))
elif dev.pluginProps.get("isSensorDevice",False):
dt = (datetime.datetime.now() - dev.lastChanged).seconds
up = dt < self.awayWhenNochangeInSeconds
#self.indiLOG.log(10,"setGroupStatus1 {}, dt:{} , up:{}, self.awayWhenNochangeInSeconds:{}".format(dev.name, dt, up, self.awayWhenNochangeInSeconds))
if up:
self.groupStatusList["SENSOR"]["nHome"] +=1
triggerGroup[xx]["oneHome"] = True
else:
triggerGroup[xx]["oneHome"] = False
self.groupStatusList["SENSOR"]["nAway"] +=1
okList.append("{}".format(dev.id))
and since I don't know what kind of non sensor, non BLE devices would have "devlastChanged" states, I can't be sure whether the entire elif should be removed OR another
- Code: Select all
for xx in _GlobalConst_groupListDef:
should be added just under the
#self.indiLOG.log(10,"setGroupStatus1 {}, dt:{} , up:{}, self.awayWhenNochangeInSeconds:{}".format(dev.name, dt, up, self.awayWhenNochangeInSeconds))
and I don't want to break anything by tweaking the code.