hif2k1 / battery_sim

Home assistant home battery simulator - allows you to model how much energy you would save with a home battery
125 stars 14 forks source link

Setup through "UI only" leads to errors #28

Closed SirUli closed 2 years ago

SirUli commented 2 years ago

Since you enabled the Setup through the Config Wizard i thought to move everything into the UI based mode since that would create proper entries in the integrations overview. So i renamed my previous config (was pretty fresh) and configured the batteries in the UI. On restart of Homeassistant I unfortunately i get the following messages in my log since then:

2022-04-15 08:45:02 ERROR (MainThread) [homeassistant.setup] Error during setup of component battery_sim
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/config/custom_components/battery_sim/__init__.py", line 48, in async_setup
for battery, conf in config.get(DOMAIN).items():
AttributeError: 'NoneType' object has no attribute 'items'

And of course the batteries do nothing ;) I guess that wasn't intended that way?

hif2k1 commented 2 years ago

Should be fixed with latest update. Many thanks for flagging this up.

SirUli commented 2 years ago

Indeed, that solved it. Thanks for the quick response!