TheBrain8791 / ha_awattar

Adds Awattar energy cost data to Home Assistant.
Other
11 stars 1 forks source link

Error with method async_setup_platforms still not solved / Patch not merged #10

Closed crazydoc72 closed 5 months ago

crazydoc72 commented 5 months ago

2024-03-30 17:14:50.595 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Awattar (at) for awattar_energy_cost Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/awattar_energy_cost/init.py", line 26, in async_setup_entry hass.config_entries.async_setup_platforms(entry, PLATFORMS) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms' 2024-03-30 17:18:44.025 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Awattar (at) for awattar_energy_cost Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/awattar_energy_cost/init.py", line 24, in async_setup_entry shell.add_entry(entry) File "/config/custom_components/awattar_energy_cost/init.py", line 69, in add_entry self._hass.add_job(source.fetch) ^^^^^^ UnboundLocalError: cannot access local variable 'source' where it is not associated with a value

crazydoc72 commented 5 months ago

https://github.com/TheBrain8791/ha_awattar/pull/9

This fork works for me!