diff --git a/esphome/espota2.py b/esphome/espota2.py index f808d558d7..99c91d94e2 100644 --- a/esphome/espota2.py +++ b/esphome/espota2.py @@ -317,7 +317,7 @@ def run_ota_impl_( try: # Resolve all hosts at once for parallel DNS resolution res = resolve_ip_address( - remote_host, remote_port, address_cache=getattr(CORE, "address_cache", None) + remote_host, remote_port, address_cache=CORE.address_cache ) except EsphomeError as err: _LOGGER.error(