asantaga / lightwaverf_HA_EnergySensor

Home Assistant Sensor for the LightwaveRF energy monitor
MIT License
5 stars 3 forks source link

Unable to prepare setup for platform lightwaverf_energy.sensor #12

Closed artfulbodger closed 2 years ago

artfulbodger commented 2 years ago

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

sensor lightwaverf_energy:
  - platform: lightwaverf_energy
    scan_interval: 30

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

asantaga commented 2 years ago

Apologies, Looks like my docs got screwed up. Correct yaml is

lightwaverf_energy:
  scan_interval: 30
artfulbodger commented 2 years ago

Using your corrected yaml, I am now receiving the consumption data, thank you