[BUG] Error in log output
Bug Description
Today, I noticed that an error kept spamming my log output.
Steps to Reproduce
I don't know what's causing it, and therefore, I don't know how to reproduce it.
Expected Behavior
The log does not contain the issue.
Actual Behavior
The error occurred 472 times within 2 hours.
Environment
- Home Assistant version: 2025.10.3
- Integration version: 1.0.7
- Postal code: 37297
- Providers enabled: both
Logs
2025-10-23 10:25:11.007 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.mail_delivery_37297 fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 963, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1314, in async_device_update
await self.async_update()
File "/config/custom_components/swemail/sensor.py", line 157, in async_update
newDate = datetime.strptime(nextDelivery, "%Y-%m-%d")
File "/usr/local/lib/python3.13/_strptime.py", line 789, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/_strptime.py", line 555, in _strptime
raise ValueError("time data %r does not match format %r" %
(data_string, format))
ValueError: time data '' does not match format '%Y-%m-%d'
Vilket postnummer gäller det? Skicka om om du inte vill dumpa det här.
372 97
Today, I noticed the same error.
Home Assistant version: 2025.11.3 Integration version: 1.0.7 Postal code: 30591 Providers enabled: postnord
Logs 2025-12-09 20:18:24.390 ERROR (SyncWorker_0) [custom_components.swemail.woker] Process data failed (PN): list index out of range
2025-12-09 20:18:28.038 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.postnord_delivery_30591 fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 963, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1314, in async_device_update await self.async_update() File "/config/custom_components/swemail/sensor.py", line 69, in async_update nextDate = datetime.strptime(nextDelivery, "%Y-%m-%d") File "/usr/local/lib/python3.13/_strptime.py", line 789, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/_strptime.py", line 555, in _strptime raise ValueError("time data %r does not match format %r" % (data_string, format)) ValueError: time data '' does not match format '%Y-%m-%d'
2025-12-10 08:50:57.374 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'swemail' sets option flow config_entry explicitly, which is deprecated at custom_components/swemail/config_flow.py, line 81: self.config_entry = config_entry. This will stop working in Home Assistant 2025.12, please create a bug report at https://github.com/dsorlov/swemail/issues