mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Adjust freedompro cover position method (#73945)
This commit is contained in:
parent
3743d42ade
commit
9eed8b2ef4
@ -105,15 +105,13 @@ class Device(CoordinatorEntity, CoverEntity):
|
|||||||
"""Close the cover."""
|
"""Close the cover."""
|
||||||
await self.async_set_cover_position(position=0)
|
await self.async_set_cover_position(position=0)
|
||||||
|
|
||||||
async def async_set_cover_position(self, **kwargs):
|
async def async_set_cover_position(self, **kwargs: Any) -> None:
|
||||||
"""Async function to set position to cover."""
|
"""Async function to set position to cover."""
|
||||||
payload = {}
|
payload = {"position": kwargs[ATTR_POSITION]}
|
||||||
payload["position"] = kwargs[ATTR_POSITION]
|
|
||||||
payload = json.dumps(payload)
|
|
||||||
await put_state(
|
await put_state(
|
||||||
self._session,
|
self._session,
|
||||||
self._api_key,
|
self._api_key,
|
||||||
self.unique_id,
|
self.unique_id,
|
||||||
payload,
|
json.dumps(payload),
|
||||||
)
|
)
|
||||||
await self.coordinator.async_request_refresh()
|
await self.coordinator.async_request_refresh()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user