From 72d706ab5259e6bd7f6af08255eba165d3ddcd69 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Tue, 2 Jul 2024 23:51:14 +1200 Subject: [PATCH] [ESPHome] Disable dashboard based update entities by default (#120907) Co-authored-by: Paulus Schoutsen --- homeassistant/components/esphome/update.py | 1 + tests/components/esphome/test_update.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/homeassistant/components/esphome/update.py b/homeassistant/components/esphome/update.py index cb3d36dab9d..e86c88ddf5b 100644 --- a/homeassistant/components/esphome/update.py +++ b/homeassistant/components/esphome/update.py @@ -97,6 +97,7 @@ class ESPHomeDashboardUpdateEntity( _attr_title = "ESPHome" _attr_name = "Firmware" _attr_release_url = "https://esphome.io/changelog/" + _attr_entity_registry_enabled_default = False def __init__( self, entry_data: RuntimeEntryData, coordinator: ESPHomeDashboardCoordinator diff --git a/tests/components/esphome/test_update.py b/tests/components/esphome/test_update.py index 992a6ad2ba9..c9826c3f347 100644 --- a/tests/components/esphome/test_update.py +++ b/tests/components/esphome/test_update.py @@ -34,6 +34,11 @@ from homeassistant.exceptions import HomeAssistantError from .conftest import MockESPHomeDevice +@pytest.fixture(autouse=True) +def enable_entity(entity_registry_enabled_by_default: None) -> None: + """Enable update entity.""" + + @pytest.fixture def stub_reconnect(): """Stub reconnect."""