Skip to content
Draft
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion custom_components/porscheconnect/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def __init__(

self.coordinator = coordinator
self.entity_description = description
self._attr_unique_id = f'{vehicle.data["name"]}-{description.key}'
self._attr_unique_id = f'{vehicle.vin}-{description.key}'

@callback
def _handle_coordinator_update(self) -> None:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/porscheconnect/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def __init__(
self.entity_description = description

self._attr_content_type = CONTENT_TYPE
self._attr_unique_id = f'{vehicle.data["name"]}-{description.key}'
self._attr_unique_id = f'{vehicle.vin}-{description.key}'
self._attr_image_url = vehicle.picture_locations[description.view]

async def async_added_to_hass(self):
Expand Down
2 changes: 1 addition & 1 deletion custom_components/porscheconnect/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(
"""Initialize the lock."""
super().__init__(coordinator, vehicle)

self._attr_unique_id = f'{vehicle.data["name"]}-lock'
self._attr_unique_id = f'{vehicle.vin}-lock'
self.door_lock_state_available = vehicle.has_remote_services

async def async_lock(self) -> None:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/porscheconnect/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(
super().__init__(coordinator, vehicle)

self.entity_description = description
self._attr_unique_id = f"{vehicle.data['name']}-{description.key}"
self._attr_unique_id = f"{vehicle.vin}-{description.key}"

@property
def native_value(self) -> float | None:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/porscheconnect/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def __init__(
super().__init__(coordinator, vehicle)

self.entity_description = description
self._attr_unique_id = f"{vehicle.data['name']}-{description.key}"
self._attr_unique_id = f"{vehicle.vin}-{description.key}"

@callback
def _handle_coordinator_update(self) -> None:
Expand Down