Don't use executor for lutron subscription (#75726)

pull/75738/head
uvjustin 2022-07-26 04:32:00 +08:00 committed by GitHub
parent 2df20e7a42
commit 3aa75f3fcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -124,9 +124,7 @@ class LutronDevice(Entity):
async def async_added_to_hass(self):
"""Register callbacks."""
self.hass.async_add_executor_job(
self._lutron_device.subscribe, self._update_callback, None
)
self._lutron_device.subscribe(self._update_callback, None)
def _update_callback(self, _device, _context, _event, _params):
"""Run when invoked by pylutron when the device state changes."""