Skip to content

Commit

Permalink
Merge pull request #312 from alandtse/dev
Browse files Browse the repository at this point in the history
fix: add missing close_cover for frunks
  • Loading branch information
alandtse authored Oct 27, 2022
2 parents bcde641 + 3257775 commit bf1c5be
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions custom_components/tesla_custom/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ def __init__(
self._attr_device_class = CoverDeviceClass.DOOR
self._attr_icon = "mdi:car"

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_frunk()
await self.async_update_ha_state()

async def async_open_cover(self, **kwargs):
"""Send open cover command."""
_LOGGER.debug("Opening cover: %s", self.name)
Expand Down

0 comments on commit bf1c5be

Please sign in to comment.