core: Hayward OmniLogic Integration Error on Setup
The problem
I am a new Hayward OmniLogic user and wanted to setup this integration. When adding the integration, I see the card show up in the list of integrations but no sensors are detected. I am seeing the error below in the setup logs:
Logger: homeassistant.config_entries
Source: components/omnilogic/__init__.py:45
First occurred: 12:13:10 PM (2 occurrences)
Last logged: 3:00:53 PM
Error setting up entry Omnilogic for omnilogic
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 249, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/omnilogic/__init__.py", line 45, in async_setup_entry
await api.get_telemetry_data()
File "/usr/local/lib/python3.8/site-packages/omnilogic/__init__.py", line 1008, in get_telemetry_data
site_telem = self.telemetry_to_json(telem, config_item, self.alarms_to_json(this_alarm))
File "/usr/local/lib/python3.8/site-packages/omnilogic/__init__.py", line 813, in telemetry_to_json
for light in bow_item["Lights"]:
KeyError: 'Lights'
Thanks for any guidance.
What is version of Home Assistant Core has the issue?
2021.4.6
What was the last working version of Home Assistant Core?
New integration install.
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
Hayward Omnilogic
Link to integration documentation on our website
https://www.home-assistant.io/integrations/omnilogic/
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Logger: homeassistant.config_entries
Source: components/omnilogic/__init__.py:45
First occurred: 12:13:10 PM (2 occurrences)
Last logged: 3:00:53 PM
Error setting up entry Omnilogic for omnilogic
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 249, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/omnilogic/__init__.py", line 45, in async_setup_entry
await api.get_telemetry_data()
File "/usr/local/lib/python3.8/site-packages/omnilogic/__init__.py", line 1008, in get_telemetry_data
site_telem = self.telemetry_to_json(telem, config_item, self.alarms_to_json(this_alarm))
File "/usr/local/lib/python3.8/site-packages/omnilogic/__init__.py", line 813, in telemetry_to_json
for light in bow_item["Lights"]:
KeyError: 'Lights'
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 23 (11 by maintainers)
@mikebol - you will need to copy the full omnilogic folder from the PR branch into your custom_components folder. There is also an update to the sensor.py file. I tested with your data and it is working correctly.
@mikebol it appears there is a fair bit different with what your pool is returning. I’ll have to do some further digging and testing.