From eeaba74553d8a5ed629fd5fc6be83ec232eefca4 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Wed, 4 Aug 2021 17:33:17 +0200 Subject: [PATCH] Fix external components not refreshing with default or high refresh time (#2122) --- esphome/components/external_components/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/external_components/__init__.py b/esphome/components/external_components/__init__.py index 3e833d0b66..8f6e2bece4 100644 --- a/esphome/components/external_components/__init__.py +++ b/esphome/components/external_components/__init__.py @@ -147,7 +147,7 @@ def _process_git_config(config: dict, refresh) -> str: age = datetime.datetime.now() - datetime.datetime.fromtimestamp( file_timestamp.stat().st_mtime ) - if age.seconds > refresh.total_seconds: + if age.total_seconds() > refresh.total_seconds: _LOGGER.info("Updating %s", key) _LOGGER.debug("Location: %s", repo_dir) # Stash local changes (if any)