ha-dyson icon indicating copy to clipboard operation
ha-dyson copied to clipboard

2024.8.0 - async_forward_entry_setup warning in logs

Open RedNo7 opened this issue 1 year ago • 2 comments

Hi,

Got this after updating to 2024.8.0 (only a warning until Jan - v2025.1)

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:151
First occurred: 08:41:17 (4 occurrences)
Last logged: 08:41:17

Detected code that calls async_forward_entry_setup for integration dyson_local with title: Pure Cool and entry_id: 1c3f95d046f740418d0b03b4d2504fdc, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.

RedNo7 avatar Aug 08 '24 07:08 RedNo7

Same here, but I have been getting this since the previous version too, I don't think it's new. I'm currently running 2024.7.4 with the same messages. Not urgent, as you point out, it will work for the rest of the year. But definitely needs to be addressed. A few other integrations I use have similar warnings.

danielgoepp avatar Aug 09 '24 09:08 danielgoepp

Same issue here as well:

image

dbdavid44 avatar Aug 10 '24 07:08 dbdavid44

Hi everyone here! The latest release (v1.4.0) should finally resolve these silly logs. Please feel free to tell me I'm wrong if it doesn't though! Thanks to @slyoldfox for the PR that resolves this.

dotvezz avatar Aug 18 '24 18:08 dotvezz

yep that all went and this is in it's place:

Logger: homeassistant.components.fan
Source: components/fan/__init__.py:295
integration: Fan (documentation, issues)
First occurred: 20:34:55 (4 occurrences)
Last logged: 20:34:57

Entity None (<class 'custom_components.dyson_local.fan.DysonPureCoolEntity'>) does not set FanEntityFeature.TURN_OFF but implements the turn_off method. Please create a bug report at https://github.com/libdyson-wg/ha-dyson/issues
Entity None (<class 'custom_components.dyson_local.fan.DysonPureCoolEntity'>) does not set FanEntityFeature.TURN_ON but implements the turn_on method. Please create a bug report at https://github.com/libdyson-wg/ha-dyson/issues

Shall I raise a different issue (not sure if it is related or co-incidental)?

RedNo7 avatar Aug 18 '24 19:08 RedNo7

I'm betting this is the result of https://github.com/libdyson-wg/ha-dyson/pull/182.

Edit: Yeah, here's what should be done: https://developers.home-assistant.io/blog/2024/07/19/fan-fanentityfeatures-turn-on_off/

mundschenk-at avatar Aug 18 '24 19:08 mundschenk-at

Are you saying that it is already covered by #182 or that I should raise a separate issue?

RedNo7 avatar Aug 18 '24 20:08 RedNo7

I am saying that it's a separate issue caused by #182 being incomplete/incorrect.

mundschenk-at avatar Aug 18 '24 20:08 mundschenk-at

@mundschenk-at @RedNo7 that one is actually not new, and is already being tracked in #128.

@mundschenk-at you may notice that the work in the doc you referenced has already been done in previous PR merges. #182 was an additional change hoping to help resolve it. Obviously there is some bug but #182 didn't cause it. If you happen to find it then please feel free to open a PR!

dotvezz avatar Aug 19 '24 00:08 dotvezz

Ah, quick correction on my above comment. #128 tracks ClimateEntityFeature, but your log is FanEntityFeature - this is different.

@mundschenk-at to be clear though, it is still not caused by #182. It is a brand new log message as of Home Assistant 2024.8. Additionally, the log provided by @RedNo7 specifies the class DysonPureCoolEntity which does not inherit the change to DysonClimateEntity which was modified in this PR. So it is definitely unrelated. The new log message will be quickly addressed, so please don't worry.

dotvezz avatar Aug 19 '24 00:08 dotvezz

Oops, sorry @dotvezz, I missed the obvious thing that it was talking about two different entity types and just saw the compatibility flag.

So yeah, completely new issue because of a deprecation in 2024.8.0.

mundschenk-at avatar Aug 19 '24 04:08 mundschenk-at

The new log message will be quickly addressed, so please don't worry.

@dotvezz would you like me to raise a new issue or is there no point as you are already addressing it?

RedNo7 avatar Aug 19 '24 06:08 RedNo7

@RedNo7 no worries, it's #183 so no action needed from you. Thanks though!

dotvezz avatar Aug 19 '24 11:08 dotvezz

Closing this then as fixed.

RedNo7 avatar Aug 19 '24 11:08 RedNo7