After installing the integration via HACS and adding the sensor to configuration.yaml the integration failing to complete setup after restarting Home Assistant:
2022-05-07 18:45:34 ERROR (MainThread) [homeassistant.setup] Error during setup of component lightwaverf_energy Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/lightwaverf_energy/init.py", line 29, in setup
hass.data[DATA_KEY] = config[DOMAIN][0][CONF_SCAN_INTERVAL]
IndexError: list index out of range
2022-05-07 18:45:34 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform lightwaverf_energy.sensor: Unable to set up component.
After installing the integration via HACS and adding the sensor to configuration.yaml the integration failing to complete setup after restarting Home Assistant:
configuration.yaml
Log
2022-05-07 18:45:34 ERROR (MainThread) [homeassistant.setup] Error during setup of component lightwaverf_energy Traceback (most recent call last): File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/setup.py", line 235, in _async_setup_component result = await task File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/home/homeassistant/.homeassistant/custom_components/lightwaverf_energy/init.py", line 29, in setup hass.data[DATA_KEY] = config[DOMAIN][0][CONF_SCAN_INTERVAL] IndexError: list index out of range 2022-05-07 18:45:34 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform lightwaverf_energy.sensor: Unable to set up component.
System Health
version: core-2022.4.7 installation_type: Home Assistant Core dev: false hassio: false docker: false user: homeassistant virtualenv: true python_version: 3.9.2 os_name: Linux os_version: 5.10.0-14-amd64 arch: x86_64 timezone: Europe/London