pnbruckner / ha-sun2

Home Assistant Sun2 Sensor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors in Sun2 with 2021.6

DavidFW1960 opened this issue · comments

It never ends... You maybe already know but 2021.6 is breaking sun2

2021-05-28 09:37:05 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform sun2
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 585, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 614, in add_to_platform_finish
await self.async_added_to_hass()
File "/config/custom_components/sun2/sensor.py", line 158, in async_added_to_hass
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:05 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up sun2 platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 257, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 585, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 614, in add_to_platform_finish
await self.async_added_to_hass()
File "/config/custom_components/sun2/sensor.py", line 158, in async_added_to_hass
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 WARNING (SyncWorker_1) [homeassistant.components.history] state_changes_during_period was called from average, this is a deprecated function. Use homeassistant.components.recorder.history.state_changes_during_period instead, please report this to the maintainer of average
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'
2021-05-28 09:37:15 ERROR (MainThread) [homeassistant.util.logging] Exception in async_loc_updated when dispatching 'sun2_loc_updated': ()
Traceback (most recent call last):
File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated
self._loc_updated()
File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'

Same error here:

  • platform: sun2
    monitored_conditions:
    • sunrise
    • sunset
    • solar_noon
    • max_elevation
    • daylight

and this is my first error message:

Logger: homeassistant.components.sensor
Source: custom_components/sun2/sensor.py:43
Integration: Sensor (documentation, issues)
First occurred: 13:55:21 (2 occurrences)
Last logged: 13:55:21

Error adding entities for domain sensor with platform sun2
Error while setting up sun2 platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 585, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 614, in add_to_platform_finish
await self.async_added_to_hass()
File "/config/custom_components/sun2/sensor.py", line 158, in async_added_to_hass
self._setup_fixed_updating()
File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating
next_midn = next_midnight(dt_util.now(self._tzinfo))
File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight
return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time()))
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'

and this is the second error message:

Logger: homeassistant.util.logging
Source: util/logging.py:105
First occurred: 13:55:32 (10 occurrences)
Last logged: 13:55:32

Exception in async_loc_updated when dispatching 'sun2_loc_updated': () Traceback (most recent call last): File "/config/custom_components/sun2/sensor.py", line 145, in async_loc_updated self._loc_updated() File "/config/custom_components/sun2/sensor.py", line 140, in _loc_updated self._setup_fixed_updating() File "/config/custom_components/sun2/sensor.py", line 130, in _setup_fixed_updating next_midn = next_midnight(dt_util.now(self._tzinfo)) File "/config/custom_components/sun2/sensor.py", line 43, in next_midnight return dt.tzinfo.localize(datetime.combine(dt.date() + _ONE_DAY, time())) AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'localize'

Yes, I did hear, and I'm working on a fix. The core team has made some major changes to how time zones are manipulated in the core. It never ends!