jrfernandes / ontario_energy_board

Home Assistant component that installs a sensor with the current energy rate for Ontario energy companies
MIT License
46 stars 11 forks source link

Errors after upgrading to HASS 2024.4.4 #48

Closed sirtow closed 7 months ago

sirtow commented 7 months ago

Getting the error below for Alectra Utilities Corporation-PowerStream Rate Zone (RESIDENTIAL)

Traceback (most recent call last):
   File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh
     self.data = await self._async_update_data()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/ha/.homeassistant/custom_components/ontario_energy_board/coordinator.py", line 57, in _async_update_data
     company_energy_sector_search.group(1).lower().replace(" ", "_")
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AttributeError: 'NoneType' object has no attribute 'group'
jrfernandes commented 7 months ago

Are you using the latest version (v0.4.1)?

sirtow commented 7 months ago

It seems I do. I did complete update of core and the components. I see that with the new version , the company names changed and hence my existing entity stopped working. Did I miss any upgrade notes ? :P

Once i created a new entity and deleted the old one - the errors are gone.

I assume the name changes will happen in the future. Is there an easy way to update this without re-creating an entity. I have too many energy monitoring entities relying on this integration. its time consuming to update them 1-by-1 to point to the new entity.