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

Covers stopped reporting state from 2024.7.0 onwards (Rollease Acmeda Automate integration) #123509

Open
TheHomieFox opened this issue Aug 10, 2024 · 1 comment · May be fixed by #125483
Open

Comments

@TheHomieFox
Copy link

TheHomieFox commented Aug 10, 2024

The problem

Integration Rollease Acmeda Automate with issues since 2024.7.0. I have been able to pinpoint the version in which the issue started, up to 2024.6.4 everything worked well.

For entities added on previous versions and after upgrading to 2024.7.0 or above, covers work but the state and position of the covers are no longer updated after each service call to open or close the cover.

Log entry when attempting to add the integration - 1 ERROR and 1 WARNING:

ERROR

Logger: homeassistant
Source: helpers/frame.py:197
First occurred: 3:44:41 PM (2 occurrences)
Last logged: 3:44:41 PM

Error doing job: Future exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/acmeda/base.py", line 65, in notify_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1006, in async_write_ha_state
    report_non_thread_safe_operation("async_write_ha_state")
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 225, in report_non_thread_safe_operation
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 159, in report
    _report_integration(what, integration_frame, level, error_if_integration)
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 197, in _report_integration
    raise RuntimeError(
RuntimeError: Detected that integration 'acmeda' calls async_write_ha_state from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#async_write_ha_state at homeassistant/components/acmeda/base.py, line 65: self.async_write_ha_state(). Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+acmeda%22.

WARNING:

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:184
First occurred: 3:44:41 PM (2 occurrences)
Last logged: 3:44:41 PM

Detected that integration 'acmeda' calls async_write_ha_state from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#async_write_ha_state at homeassistant/components/acmeda/base.py, line 65: self.async_write_ha_state(), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+acmeda%22

I have a test instance and can provide any further details as required.

What version of Home Assistant Core has the issue?

core-2024.7.0

What was the last working version of Home Assistant Core?

core-2024.6.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

acmeda

Link to integration documentation on our website

https://www.home-assistant.io/integrations/acmeda/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @atmurray, mind taking a look at this issue as it has been labeled with an integration (acmeda) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of acmeda can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign acmeda Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


acmeda documentation
acmeda source
(message by IssueLinks)

atmurray added a commit to atmurray/home-assistant that referenced this issue Aug 31, 2024
Resolve issue home-assistant#123509 due to calls to async_write_ha_state from a thread other than the event loop
Bump aiopulse version to 0.4.6 to fix issues with hub timers as well as unicode characters in strings.
@atmurray atmurray mentioned this issue Aug 31, 2024
19 tasks
@atmurray atmurray linked a pull request Sep 8, 2024 that will close this issue
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant