HazardDede / home-assistant-ferienapidotde

Home assistant binary sensor component to indicate if today is a german vacational day or not
MIT License
5 stars 2 forks source link

Error after 2022.9.6 update #6

Closed RealJustMe closed 2 years ago

RealJustMe commented 2 years ago

Logger: custom_components.ferienapidotde.binary_sensor Source: custom_components/ferienapidotde/binary_sensor.py:81 Integration: ferienapidotde (documentation) First occurred: 02:23:55 (103 occurrences) Last logged: 07:22:13

Traceback (most recent call last): File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.9/site-packages/ferien/model.py", line 59, in _parse_date dt = datetime.strptime(candidate, '%Y-%m-%dT%H:%M') File "/home/homeassistant/.pyenv/versions/3.9.10/lib/python3.9/_strptime.py", line 568, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) File "/home/homeassistant/.pyenv/versions/3.9.10/lib/python3.9/_strptime.py", line 349, in _strptime raise ValueError("time data %r does not match format %r" % ValueError: time data '2021-02-01' does not match format '%Y-%m-%dT%H:%M' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/mnt/dietpi_userdata/homeassistant/custom_components/ferienapidotde/binary_sensor.py", line 77, in async_setup_platform await data_object.async_update() File "/mnt/dietpi_userdata/homeassistant/custom_components/ferienapidotde/binary_sensor.py", line 159, in async_update self.data = await ferien.state_vacations_async(self.state_code) File "/mnt/dietpiuserdata/homeassistant/deps/lib/python3.9/site-packages/ferien/async.py", line 58, in state_vacations_async return await _convert_json(resp) File "/mnt/dietpiuserdata/homeassistant/deps/lib/python3.9/site-packages/ferien/async.py", line 30, in _convert_json res.append(Vacation.from_dict(entry)) File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.9/site-packages/ferien/model.py", line 71, in from_dict start=cls._parse_date(dct['start']), File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.9/site-packages/ferien/model.py", line 62, in _parse_date dt = datetime.strptime(candidate, '%Y-%m-%dT%H:%MZ') File "/home/homeassistant/.pyenv/versions/3.9.10/lib/python3.9/_strptime.py", line 568, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) File "/home/homeassistant/.pyenv/versions/3.9.10/lib/python3.9/_strptime.py", line 349, in _strptime raise ValueError("time data %r does not match format %r" % ValueError: time data '2021-02-01' does not match format '%Y-%m-%dT%H:%MZ'

fisch55 commented 2 years ago

same issue here

bluenazgul commented 2 years ago

Exact the Same issue here, too

pschyrembel258 commented 2 years ago

Same here

Jens201 commented 2 years ago

Home Assistant 2022.10.0 issue still exist. Can we even expect support anymore?

HazardDede commented 2 years ago

Yeah, sorry for my late response. I am pretty busy these days and my primary (money making) work comes first ;-) I already figured out what the actual problem is: The date format of the api has changed.

A PR on the ferien-api component is already in place: https://github.com/HazardDede/ferien-api/pull/9 As soon as I am convinced everything is right, it will be merged and a new version will be created. The dependency will be bumped on this project and hopefully everything will go back to normal then ;-)

HazardDede commented 2 years ago

Should be fixed: https://github.com/HazardDede/home-assistant-ferienapidotde/releases/tag/v0.2.4

RealJustMe commented 2 years ago

Ofcourse your job comes first :) The Update seems to work fine on my end, no errorlogs and i get data again. Thank you!