Closed shbatm closed 5 years ago
Thanks for reporting. Are you able to put in a PR for this bug?
On Mon, Mar 19, 2018 at 12:04 shbatm notifications@github.com wrote:
Some ISY Node Server Nodes (e.g. n002_huegrp0) do not have a parent status and throw an error when processing groups during initialization. I do not have the exact error traceback, but it amounted to something along the lines of "cannot compare type NoneType to type Int with >".
Apparent Fix: Update group.py line 83 https://github.com/automicus/PyISY/blob/master/PyISY/Nodes/group.py#L83 to the following:
if self.parent[m].status == None: continue elif self.parent[m].status > 0:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/automicus/PyISY/issues/39, or mute the thread https://github.com/notifications/unsubscribe-auth/AEuhGvr5RF0JQG8hC3ip_982AakvykVwks5tf9b6gaJpZM4SwcDl .
-- Thanks,
Ryan Kraus
Confirmed fix in PR worked for me. Below is the trace log from my use in Home Assisstant:
2018-12-07 22:14:06 ERROR (MainThread) [homeassistant.setup] Error during setup of component isy994
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 148, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/isy994.py", line 379, in setup
use_https=https, tls_ver=tls_version, log=_LOGGER)
File "/usr/local/lib/python3.6/site-packages/PyISY/ISY.py", line 84, in __init__
self.nodes = Nodes(self, xml=self.conn.getNodes())
File "/usr/local/lib/python3.6/site-packages/PyISY/Nodes/__init__.py", line 52, in __init__
self.parse(xml)
File "/usr/local/lib/python3.6/site-packages/PyISY/Nodes/__init__.py", line 238, in parse
Group(self, nid, nname, members, controllers), ntype)
File "/usr/local/lib/python3.6/site-packages/PyISY/Nodes/group.py", line 43, in __init__
self.update()
File "/usr/local/lib/python3.6/site-packages/PyISY/Nodes/group.py", line 83, in update
if self.parent[m].status > 0:
File "/usr/local/lib/python3.6/site-packages/VarEvents/__init__.py", line 255, in __gt__
return self._val > other
TypeError: '>' not supported between instances of 'NoneType' and 'int'
Some ISY Node Server Nodes (e.g. n002_huegrp0) do not have a parent status and throw an error when processing groups during initialization. I do not have the exact error traceback, but it amounted to something along the lines of "cannot compare type NoneType to type Int with >".
Apparent Fix: Update
group.py
line 83 to the following: