Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/integrations/home_assistant/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
self.__publish_ha_discovery_messages_real()
self.published = True

def __publish_ha_discovery_messages_real(self) -> None:

Check failure on line 127 in src/integrations/home_assistant/discovery.py

View workflow job for this annotation

GitHub Actions / build (3.12)

Ruff (PLR0915)

src/integrations/home_assistant/discovery.py:127:9: PLR0915 Too many statements (95 > 50)

Check failure on line 127 in src/integrations/home_assistant/discovery.py

View workflow job for this annotation

GitHub Actions / build (3.13)

Ruff (PLR0915)

src/integrations/home_assistant/discovery.py:127:9: PLR0915 Too many statements (95 > 50)
LOG.debug("Publishing Home Assistant discovery messages")

# Gateway Control
Expand Down Expand Up @@ -1041,6 +1041,7 @@
def __get_common_attributes(
self,
unique_id: str,
domain: str,
name: str,
custom_availability: HaCustomAvailabilityConfig | None = None,
) -> dict[str, Any]:
Expand All @@ -1049,6 +1050,7 @@
"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:
Expand Down Expand Up @@ -1107,7 +1109,7 @@
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 = (
Expand Down
Loading