From da63a962737d6411f231cf71867c24ca46e9e125 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Mon, 4 Oct 2021 13:17:42 +0200 Subject: [PATCH] ESPHome fix zeroconf add_listener issue (#57031) --- homeassistant/components/esphome/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/esphome/__init__.py b/homeassistant/components/esphome/__init__.py index ed23aa7ec75..ee258317357 100644 --- a/homeassistant/components/esphome/__init__.py +++ b/homeassistant/components/esphome/__init__.py @@ -503,16 +503,14 @@ class ReconnectLogic(RecordUpdateListener): """ async with self._zc_lock: if not self._zc_listening: - await self._hass.async_add_executor_job( - self._zc.add_listener, self, None - ) + self._zc.async_add_listener(self, None) self._zc_listening = True async def _stop_zc_listen(self) -> None: """Stop listening for zeroconf updates.""" async with self._zc_lock: if self._zc_listening: - await self._hass.async_add_executor_job(self._zc.remove_listener, self) + self._zc.async_remove_listener(self) self._zc_listening = False @callback