Only subscribe to relevant IDs for state updates (#85252)

Make sure to only subscribe to the relevant ID
This commit is contained in:
Robert Svensson 2023-01-06 03:49:22 +01:00 committed by GitHub
parent 9c689d757c
commit 8bf2299407
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -217,6 +217,7 @@ class UnifiSensorEntity(SensorEntity, Generic[_HandlerT, _DataT]):
self.async_on_remove( self.async_on_remove(
handler.subscribe( handler.subscribe(
self.async_signalling_callback, self.async_signalling_callback,
id_filter=self._obj_id,
) )
) )
self.async_on_remove( self.async_on_remove(

View File

@ -361,6 +361,7 @@ class UnifiSwitchEntity(SwitchEntity, Generic[_HandlerT, _DataT]):
self.async_on_remove( self.async_on_remove(
handler.subscribe( handler.subscribe(
self.async_signalling_callback, self.async_signalling_callback,
id_filter=self._obj_id,
) )
) )
self.async_on_remove( self.async_on_remove(