PyISY icon indicating copy to clipboard operation
PyISY copied to clipboard

Startup fails if ISY is still starting up

Open bdraco opened this issue 1 year ago • 3 comments

I had a power outage today and things didn't startup in the right order which resulted in the below.

The failure was transient as it just happened that hass started up while the isy was starting (which would probably be a common thing during a power event)

2022-09-26 01:38:01.303 ERROR (MainThread) [pyisy] ISY Reported an Invalid Command Received.
2022-09-26 01:38:01.382 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry House (192.168.106.67) for isy994
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 365, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/isy994/__init__.py", line 197, in async_setup_entry
    _categorize_programs(hass_isy_data, isy.programs)
  File "/usr/src/homeassistant/homeassistant/components/isy994/helpers.py", line 332, in _categorize_programs
    folder = programs.get_by_name(f"{DEFAULT_PROGRAM_STRING}{platform}")
  File "/usr/local/lib/python3.10/site-packages/pyisy/programs/__init__.py", line 323, in get_by_name
    for i in range(len(self.addresses)):
TypeError: object of type 'NoneType' has no len()

``

bdraco avatar Sep 26 '22 06:09 bdraco