Fix inner callback decorators with partials (#102873)

This commit is contained in:
J. Nick Koston 2023-10-28 08:38:42 -05:00 committed by GitHub
parent 524e20536d
commit 009dc91b97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 68 additions and 21 deletions

View file

@ -394,8 +394,8 @@ def _async_track_event(
if listeners_key not in hass_data:
hass_data[listeners_key] = hass.bus.async_listen(
event_type,
callback(ft.partial(dispatcher_callable, hass, callbacks)),
event_filter=callback(ft.partial(filter_callable, hass, callbacks)),
ft.partial(dispatcher_callable, hass, callbacks),
event_filter=ft.partial(filter_callable, hass, callbacks),
)
job = HassJob(action, f"track {event_type} event {keys}")