Fix acmeda set cover tilt position (#76927)

This commit is contained in:
epenet 2022-08-17 17:00:30 +02:00 committed by GitHub
parent 35d01d7939
commit 171893b484
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,6 +16,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .base import AcmedaBase
from .const import ACMEDA_HUB_UPDATE, DOMAIN
from .helpers import async_add_acmeda_entities
from .hub import PulseHub
async def async_setup_entry(
@ -24,7 +25,7 @@ async def async_setup_entry(
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up the Acmeda Rollers from a config entry."""
hub = hass.data[DOMAIN][config_entry.entry_id]
hub: PulseHub = hass.data[DOMAIN][config_entry.entry_id]
current: set[int] = set()
@ -122,6 +123,6 @@ class AcmedaCover(AcmedaBase, CoverEntity):
"""Stop the roller."""
await self.roller.move_stop()
async def async_set_cover_tilt(self, **kwargs):
async def async_set_cover_tilt_position(self, **kwargs: Any) -> None:
"""Tilt the roller shutter to a specific position."""
await self.roller.move_to(100 - kwargs[ATTR_POSITION])