From d42d9fa41e10bcd45c66ea67aa0da2081d121fec Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 14 Aug 2025 10:05:11 -0500 Subject: [PATCH 1/2] Update esphome/writer.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- esphome/writer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/writer.py b/esphome/writer.py index 17fd3cfc48..990602e91e 100644 --- a/esphome/writer.py +++ b/esphome/writer.py @@ -111,7 +111,7 @@ def update_storage_json(): return if storage_should_clean(old, new): - if old and old.loaded_integrations - new.loaded_integrations: + if old.loaded_integrations - new.loaded_integrations: removed = old.loaded_integrations - new.loaded_integrations _LOGGER.info( "Components removed (%s), cleaning build files...", From 7e7bfb00aa1a4a4fd5e61400e63173a6352c3ca6 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 14 Aug 2025 10:06:48 -0500 Subject: [PATCH 2/2] fix typing --- esphome/writer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/writer.py b/esphome/writer.py index 990602e91e..974c5901e0 100644 --- a/esphome/writer.py +++ b/esphome/writer.py @@ -80,7 +80,7 @@ def replace_file_content(text, pattern, repl): return content_new, count -def storage_should_clean(old: StorageJSON, new: StorageJSON) -> bool: +def storage_should_clean(old: StorageJSON | None, new: StorageJSON) -> bool: if old is None: return True