-
Notifications
You must be signed in to change notification settings - Fork 99
Open
Description
Hey!
I am getting this error message on every startup 6 times in my log. What could it be about and can I fix it myself?
home-assistant:2023.10.3
circadian-lightning:2.1.4
2023-10-17 09:49:46.339 ERROR (MainThread) [homeassistant.components.switch] Error adding entities for domain switch with platform circadian_lighting
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 752, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1057, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 779, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 879, in _async_write_ha_state
state, attr = self._async_generate_attributes()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 823, in _async_generate_attributes
attr.update(self.extra_state_attributes or {})
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/circadian_lighting/switch.py", line 268, 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 290, in _color_temperature
if not self._is_sleep()
^^^^^^^^^^^^^^^^
File "/config/custom_components/circadian_lighting/switch.py", line 284, in _is_sleep
and self.hass.states.get(self._sleep_entity).state in self._sleep_state
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'state'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels