home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.41k stars 30.3k forks source link

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

Open TheHomieFox opened 2 months ago

TheHomieFox commented 2 months ago

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[bot] commented 2 months ago

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)