ha-elvia icon indicating copy to clipboard operation
ha-elvia copied to clipboard

Maxhour not found for day 2 in month

Open LaStrada opened this issue 1 year ago • 3 comments

Version of the custom_component

0.3.0

Configuration


Add your logs here.

Describe the bug

Not loading. Not sure if this happened after upgrading to 2024.1 beta or if this happened before, but from the logs it looks like it does not work in the beginning of the year, in this case January 2nd.

Debug log

2024-01-02 21:59:54.992 DEBUG (MainThread) [custom_components.elvia] Maxhour not found for day 2 in month
2024-01-02 21:59:54.992 DEBUG (MainThread) [custom_components.elvia] Finished fetching elvia data in 0.199 seconds (success: True)
2024-01-02 21:59:54.994 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up elvia platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/elvia/sensor.py", line 71, in async_setup_entry
ElviaMaxHourAverageSensor(coordinator, True),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/elvia/sensor.py", line 156, in __init__
super().__init__(coordinator, description, "elvia")
File "/config/custom_components/elvia/sensor.py", line 97, in __init__
description.key = f"{key_prefix}_{description.key}"
^^^^^^^^^^^^^^^
File "<string>", line 4, in __setattr__
dataclasses.FrozenInstanceError: cannot assign to field 'key'
2024-01-02 22:00:07.886 DEBUG (MainThread) [custom_components.fresh_intellivent_sky] Finished fetching fresh_intellivent_sky data in 1.847 seconds (success: True)
2024-01-02 22:00:30.145 DEBUG (MainThread) [custom_components.fresh_intellivent_sky] Finished fetching fresh_intellivent_sky data in 2.107 seconds (success: True)

LaStrada avatar Jan 02 '24 18:01 LaStrada