Fix Trunks in Teslemetry and Tesla Fleet (#129986)

pull/130156/head
Brett Adams 2024-11-07 19:36:43 +10:00 committed by Franck Nijhof
parent a2ad4c9cfd
commit 5bd1b0dd9c
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
2 changed files with 2 additions and 14 deletions

View File

@ -177,13 +177,7 @@ class TeslaFleetRearTrunkEntity(TeslaFleetVehicleEntity, CoverEntity):
def _async_update_attrs(self) -> None:
"""Update the entity attributes."""
value = self._value
if value == CLOSED:
self._attr_is_closed = True
elif value == OPEN:
self._attr_is_closed = False
else:
self._attr_is_closed = None
self._attr_is_closed = self._value == CLOSED
async def async_open_cover(self, **kwargs: Any) -> None:
"""Open rear trunk."""

View File

@ -182,13 +182,7 @@ class TeslemetryRearTrunkEntity(TeslemetryVehicleEntity, CoverEntity):
def _async_update_attrs(self) -> None:
"""Update the entity attributes."""
value = self._value
if value == CLOSED:
self._attr_is_closed = True
elif value == OPEN:
self._attr_is_closed = False
else:
self._attr_is_closed = None
self._attr_is_closed = self._value == CLOSED
async def async_open_cover(self, **kwargs: Any) -> None:
"""Open rear trunk."""