You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Logger: homeassistant.components.switch
Source: custom_components/circadian_lighting/switch.py:285
Integration: Switch (documentation, issues)
First occurred: 14:27:13 (2 occurrences)
Last logged: 14:27:13
Error adding entities for domain switch with platform circadian_lighting
Error while setting up circadian_lighting platform for switch
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 613, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 748, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 505, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 541, in _async_write_ha_state
extra_state_attributes = self.extra_state_attributes
File "/config/custom_components/circadian_lighting/switch.py", line 269, in extra_state_attributes
return {"hs_color": self._hs_color, "brightness": self._brightness, "colortemp": self._color_temperature()}
File "/config/custom_components/circadian_lighting/switch.py", line 291, in _color_temperature
if not self._is_sleep()
File "/config/custom_components/circadian_lighting/switch.py", line 285, in _is_sleep
and self.hass.states.get(self._sleep_entity).state in self._sleep_state
AttributeError: 'NoneType' object has no attribute 'state'
The text was updated successfully, but these errors were encountered:
It looks like whatever entity you have configured in CL as sleep_entity is not available at the time CL tries to start up - can you share that configuration?
I thought that was an issue with the 2021.12 upgrade, but the issue may actually be on my end?
My media_player sometimes goes unavailable in HA, so this may indeed be the reason of the issue.
The fact that the circadian lighting switch magically seems to have re-appeared, seems to confirm this as well.
The text was updated successfully, but these errors were encountered: