From 3dec85cb3900e29891ebabab9955a40f5013ccb2 Mon Sep 17 00:00:00 2001 From: Troon Date: Thu, 2 Oct 2025 09:48:20 +0100 Subject: [PATCH] Update discovery.py for latest HA AD object_id becomes default_entity_id --- src/integrations/home_assistant/discovery.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/integrations/home_assistant/discovery.py b/src/integrations/home_assistant/discovery.py index a133996..bde046f 100644 --- a/src/integrations/home_assistant/discovery.py +++ b/src/integrations/home_assistant/discovery.py @@ -1041,6 +1041,7 @@ def __publish_select( def __get_common_attributes( self, unique_id: str, + domain: str, name: str, custom_availability: HaCustomAvailabilityConfig | None = None, ) -> dict[str, Any]: @@ -1048,7 +1049,7 @@ def __get_common_attributes( "name": name, "device": self.__get_device_node(), "unique_id": unique_id, - "object_id": unique_id, + "default_entity_id": f"{domain}.{unique_id}", } if custom_availability is not None: @@ -1107,7 +1108,7 @@ def __publish_ha_discovery_message( vin = self.vin unique_id = f"{vin}_{snake_case(sensor_name)}" final_payload = ( - self.__get_common_attributes(unique_id, sensor_name, custom_availability) + self.__get_common_attributes(unique_id, sensor_type, sensor_name, custom_availability) | payload ) ha_topic = (