Fix minor async issues in Plex (#33785)

* Fix minor async context issues

* Annotate callback
This commit is contained in:
jjlawren 2020-04-07 12:17:16 -05:00 committed by GitHub
parent 81569f10c0
commit 3873b23704
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 7 deletions

View file

@ -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),
)