Danielhiversen / home_assistant_tibber_data

Display Tibber data sensors.
MIT License
42 stars 13 forks source link

Wrong date #84

Closed FSHelgeland closed 7 months ago

FSHelgeland commented 9 months ago

Seems like Tibber data did not handle the leap year so now the date is wrong, leading to an error.

Denne feilen stammer fra en tilpasset integrasjon.

Logger: custom_components.tibber_data.data_coordinator
Source: custom_components/tibber_data/data_coordinator.py:87
Integration: Tibber data (documentation, issues)
First occurred: 02:51:36 (194 occurrences)
Last logged: 09:25:22

Error fetching Tibber data
Traceback (most recent call last):
  File "/config/custom_components/tibber_data/data_coordinator.py", line 87, in _update
    self._update_functions[_func] = await _func(_data, now)
                                    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tibber_data/data_coordinator.py", line 472, in _get_data
    _date = date.replace(year=date.year + 1)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: day is out of range for month
gulli1986 commented 8 months ago

Exact same error and came to the same conclusion regarding leap year.

LotharWoman commented 8 months ago

Same Error here in two installations since 2024.03.01.

`Logger: custom_components.tibber_data.data_coordinator Source: custom_components/tibber_data/data_coordinator.py:87 Integration: Tibber data (documentation, issues) First occurred: 18:44:50 (7 occurrences) Last logged: 18:57:22

Error fetching Tibber data Traceback (most recent call last): File "/config/custom_components/tibber_data/data_coordinator.py", line 87, in _update self._update_functions[_func] = await _func(_data, now) ^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/tibber_data/data_coordinator.py", line 472, in _get_data _date = date.replace(year=date.year + 1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: day is out of range for month`