Fix minor async issues in Plex (#33785)
* Fix minor async context issues * Annotate callback
This commit is contained in:
parent
81569f10c0
commit
3873b23704
2 changed files with 12 additions and 7 deletions
|
@ -2,7 +2,10 @@
|
|||
import logging
|
||||
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect, dispatcher_send
|
||||
from homeassistant.helpers.dispatcher import (
|
||||
async_dispatcher_connect,
|
||||
async_dispatcher_send,
|
||||
)
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.helpers.event import async_call_later
|
||||
|
||||
|
@ -58,7 +61,7 @@ class PlexSensor(Entity):
|
|||
|
||||
@callback
|
||||
def update_plex(_):
|
||||
dispatcher_send(
|
||||
async_dispatcher_send(
|
||||
self.hass,
|
||||
PLEX_UPDATE_PLATFORMS_SIGNAL.format(self._server.machine_identifier),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue