Fix acmeda set cover tilt position (#76927)
This commit is contained in:
parent
35d01d7939
commit
171893b484
1 changed files with 3 additions and 2 deletions
|
@ -16,6 +16,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
from .base import AcmedaBase
|
from .base import AcmedaBase
|
||||||
from .const import ACMEDA_HUB_UPDATE, DOMAIN
|
from .const import ACMEDA_HUB_UPDATE, DOMAIN
|
||||||
from .helpers import async_add_acmeda_entities
|
from .helpers import async_add_acmeda_entities
|
||||||
|
from .hub import PulseHub
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(
|
async def async_setup_entry(
|
||||||
|
@ -24,7 +25,7 @@ async def async_setup_entry(
|
||||||
async_add_entities: AddEntitiesCallback,
|
async_add_entities: AddEntitiesCallback,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Set up the Acmeda Rollers from a config entry."""
|
"""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()
|
current: set[int] = set()
|
||||||
|
|
||||||
|
@ -122,6 +123,6 @@ class AcmedaCover(AcmedaBase, CoverEntity):
|
||||||
"""Stop the roller."""
|
"""Stop the roller."""
|
||||||
await self.roller.move_stop()
|
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."""
|
"""Tilt the roller shutter to a specific position."""
|
||||||
await self.roller.move_to(100 - kwargs[ATTR_POSITION])
|
await self.roller.move_to(100 - kwargs[ATTR_POSITION])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue