Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error at startup #4

Open
Destroyer061090 opened this issue Jan 9, 2025 · 1 comment
Open

Error at startup #4

Destroyer061090 opened this issue Jan 9, 2025 · 1 comment

Comments

@Destroyer061090
Copy link

Questo errore ha avuto origine da un'integrazione personalizzata.

Registratore: homeassistant
Fonte: custom_components/tobi/binary_sensor.py:175
Integrazione: to be or not - Room Presence (documentazione, problemi)
Prima occorrenza: 10:00:46 (1 occorrenze)
Ultimo accesso: 10:00:46

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/config/custom_components/tobi/binary_sensor.py", line 125, in presence_event_handler
await self._presence_handler(_entity_id, _old_state, _new_state)
File "/config/custom_components/tobi/binary_sensor.py", line 149, in _presence_handler
await self.update_state()
File "/config/custom_components/tobi/binary_sensor.py", line 156, in update_state
if self.get_motion_state():
~~~~~~~~~~~~~~~~~~~~~^^
File "/config/custom_components/tobi/binary_sensor.py", line 175, in get_motion_state
if self._hass.states.get(sensor).state == "on":
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'state'

@NinDTendo
Copy link
Owner

this is because ha tries loading tobi before loading the integration responsible for the entity which is checked.
please let me know if it has any impact on usage after startup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants