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

Not working with 2024.4.1? #14

Closed
jackyaz opened this issue Apr 6, 2024 · 8 comments
Closed

Not working with 2024.4.1? #14

jackyaz opened this issue Apr 6, 2024 · 8 comments
Labels
compatibility bug Something isn't working with new HA version

Comments

@jackyaz
Copy link
Contributor

jackyaz commented Apr 6, 2024

After installing the latest HA the entities aren't available anymore

@jesperll
Copy link

jesperll commented Apr 8, 2024

Same here:

2024-04-08 11:06:24.301 ERROR (MainThread) [homeassistant.components.automation.person_location_update] Person Location Update: Error executing script. Error for call_service at pos 1: async_get_hass called from the wrong thread

@rodpayne
Copy link
Owner

rodpayne commented Apr 9, 2024

I haven't been able to reproduce this yet. Do you think that you could turn on debug logging and give me the steps that lead up to the error?

@jackyaz
Copy link
Contributor Author

jackyaz commented Apr 9, 2024

Upgrading to 2024.4.2 first and will see if it persists

@jackyaz
Copy link
Contributor Author

jackyaz commented Apr 10, 2024

no luck. debug logs dont show much

2024-04-10 02:05:04.366 DEBUG (MainThread) [custom_components.person_location] ===== async_unload_entry
2024-04-10 02:05:04.367 DEBUG (MainThread) [custom_components.person_location] [_async_setup_entry] === Start === -data: {'devices': {'person.jack': 'Jack', 'person.person2': 'person2', 'person.person3': 'person3'}} -options: {'extended_away': 48, 'just_arrived': 3, 'just_left': 3}
2024-04-10 02:05:04.371 DEBUG (SyncWorker_45) [custom_components.person_location] [_listen_for_configured_entities] === Start ===
2024-04-10 02:05:04.372 DEBUG (SyncWorker_45) [custom_components.person_location] [_listen_for_configured_entities] === Return ===
2024-04-10 02:05:04.386 DEBUG (MainThread) [custom_components.person_location] [_async_setup_entry] === Return ===

@jackyaz
Copy link
Contributor Author

jackyaz commented Apr 12, 2024

ah found some better logs

Traceback (most recent call last):
  File "/config/custom_components/person_location/process_trigger.py", line 59, in call_rest_command_service
    pli.hass.services.call("rest_command", rest_command)
  File "/usr/src/homeassistant/homeassistant/core.py", line 2447, in call
    ).result()
      ^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 456, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/usr/src/homeassistant/homeassistant/core.py", line 2487, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Service rest_command.homeseer_jack_home not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 2559, in _run_service_call_catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 2587, in _execute_service
    return await self._hass.async_add_executor_job(target, service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/person_location/process_trigger.py", line 544, in handle_process_trigger
    call_rest_command_service(
  File "/config/custom_components/person_location/process_trigger.py", line 64, in call_rest_command_service
    str(e),
    ^^^^^^
  File "/usr/src/homeassistant/homeassistant/exceptions.py", line 79, in __str__
    self._message = _function_cache["async_get_exception_message"](
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 543, in async_get_exception_message
    hass = async_get_hass()
           ^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 271, in async_get_hass
    raise HomeAssistantError("async_get_hass called from the wrong thread")
homeassistant.exceptions.HomeAssistantError: async_get_hass called from the wrong thread

@jackyaz
Copy link
Contributor Author

jackyaz commented Apr 12, 2024

Looks like your commit here will fix this 5787124

@rodpayne
Copy link
Owner

Yes, please give my new release a try.

@jackyaz
Copy link
Contributor Author

jackyaz commented Apr 15, 2024

I manually edited the file and confirm it worked. I did notice that the entities are now sensors rather than device_trackers so had some automations to update but all seems OK

@rodpayne rodpayne added the compatibility bug Something isn't working with new HA version label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility bug Something isn't working with new HA version
Projects
None yet
Development

No branches or pull requests

3 participants