From f8d05b602a6e2354e91bc77cce00149236a98e68 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 20 Oct 2026 18:00:47 +0200 Subject: [PATCH] Define __init__ before other methods in La Marzocco (#187553) Co-authored-by: Claude --- homeassistant/components/lamarzocco/entity.py | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/homeassistant/components/lamarzocco/entity.py b/homeassistant/components/lamarzocco/entity.py index 5e3da5b8407b..12fac8b4e0ce 100644 --- a/homeassistant/components/lamarzocco/entity.py +++ b/homeassistant/components/lamarzocco/entity.py @@ -102,6 +102,17 @@ class LaMarzoccoEntity(LaMarzoccoBaseEntity): entity_description: LaMarzoccoEntityDescription + def __init__( + self, + coordinator: LaMarzoccoUpdateCoordinator, + entity_description: LaMarzoccoEntityDescription, + bluetooth_coordinator: LaMarzoccoBluetoothUpdateCoordinator | None = None, + ) -> None: + """Initialize the entity.""" + super().__init__(coordinator, entity_description.key) + self.entity_description = entity_description + self.bluetooth_coordinator = bluetooth_coordinator + @property @override def available(self) -> bool: @@ -120,17 +131,6 @@ class LaMarzoccoEntity(LaMarzoccoBaseEntity): return self.entity_description.available_fn(self.coordinator) return False - def __init__( - self, - coordinator: LaMarzoccoUpdateCoordinator, - entity_description: LaMarzoccoEntityDescription, - bluetooth_coordinator: LaMarzoccoBluetoothUpdateCoordinator | None = None, - ) -> None: - """Initialize the entity.""" - super().__init__(coordinator, entity_description.key) - self.entity_description = entity_description - self.bluetooth_coordinator = bluetooth_coordinator - @override async def async_added_to_hass(self) -> None: """Handle when entity is added to hass."""