Can't close the trunk with latest update
Version of the custom_component
v3.19.8
Configuration
No custom config, installed via HACS
Add your logs here.
Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:240
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 19:47:15 (1 occurrences)
Last logged: 19:47:15
[281472554395200] Entity cover.brads_model_3_trunk does not support this service.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 240, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2279, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2316, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 874, in entity_service_call
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity cover.brads_model_3_trunk does not support this service.
Describe the bug
I can no longer close the trunk after updating to v3.19.8, I can open it but when I try to close I get the error above.
I am experiencing the same issue. Only open is supported.
Seeing the same. I went as far as completely removing and deleting the integration, restarting HA, and then redownloading and reinstalling the integration. Still only open for trunk, no close.
Same here. I was using a call to the cover:toggle service to open and close the trunk, but no longer working
- cover.toggle doesn't work anymore
- cover.close_cover doesn't work
- cover.open_cover still works
Thank you 🙂
It seems to me that a change was implemented to remove the support of cover.close for the frunk, but somehow this is also applied to the trunk?
I was thinking the same thing @yoali11.
The code for TeslaCarTrunk.supported_features() is the same as the TeslaCarFrunk.
If anybody has a Power Lift Gate in their car, I bet they can close their Trunk from HA as well.
Is there any Tesla which cannot close the trunk from the keyfob and/or app? I'm not aware of any.
I've edited the cover.py file in the custom_component to add the open and close functions to the supported features, plus commented out the check for powered lift gate and open/close of the trunk is now working fine.
class TeslaCarTrunk(TeslaCarEntity, CoverEntity):
"""Representation of a Tesla car trunk cover."""
type = "trunk"
_attr_device_class = CoverDeviceClass.DOOR
_attr_icon = "mdi:car-back"
_attr_supported_features = CoverEntityFeature.OPEN | CoverEntityFeature.CLOSE
async def async_close_cover(self, **kwargs):
"""Send close cover command."""
_LOGGER.debug("Closing cover: %s", self.name)
if self.is_closed is False:
await self._car.toggle_trunk()
self.async_write_ha_state()
async def async_open_cover(self, **kwargs):
"""Send open cover command."""
_LOGGER.debug("Opening cover: %s", self.name)
if self.is_closed is True:
await self._car.toggle_trunk()
self.async_write_ha_state()
@property
def is_closed(self):
"""Return True if trunk is closed."""
return self._car.is_trunk_closed
# @property
# def supported_features(self) -> int:
# """Return supported features."""
# if self._car.powered_lift_gate:
# return CoverEntityFeature.OPEN | CoverEntityFeature.CLOSE
# return CoverEntityFeature.OPEN
Kudos, @SmarterHomeLife, that did it. Edit the file, restart HA, and my trunk now opens and closes. Thanks!
@SmarterHomeLife great you've found a fix, could you make a PR for it?
@skipishere Thanks, I've submitted a PR for this here. https://github.com/alandtse/tesla/pull/868
@alandtse any chance this could be integrated into the next release. I keep having to make a custom custom Tesla integration to be able to close my boot.
Not until the issues raised in the PR are resolved.
Confirmed that v3.20.5 fixes the problem.