Make dispatch signals unique per server (#28029)
This commit is contained in:
1 parent
6844d203a1
commit
d1fcc5762b
4 files changed
+18
-6
No files matched your search
@@ -49,7 +49,9 @@ class PlexSensor(Entity):
|
||||
"""Run when about to be added to hass."""
|
||||
server_id = self._server.machine_identifier
|
||||
unsub = async_dispatcher_connect(
|
||||
self.hass, PLEX_UPDATE_SENSOR_SIGNAL, self.async_refresh_sensor
|
||||
self.hass,
|
||||
PLEX_UPDATE_SENSOR_SIGNAL.format(server_id),
|
||||
self.async_refresh_sensor,
|
||||
)
|
||||
self.hass.data[PLEX_DOMAIN][DISPATCHERS][server_id].append(unsub)
|
||||
|
||||
|
||||
Reference in new issue
Block a user