Add Number platform to Roborock (#94209)

This commit is contained in:
Luke 2023-07-23 11:02:16 -06:00 committed by GitHub
parent 38111141f9
commit 5158461dec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 176 additions and 4 deletions

View file

@ -31,7 +31,7 @@ class RoborockEntity(Entity):
@property
def api(self) -> RoborockLocalClient:
"""Returns the api."""
"""Return the Api."""
return self._api
def get_cache(self, attribute: CacheableAttribute) -> AttributeCache:
@ -39,7 +39,9 @@ class RoborockEntity(Entity):
return self._api.cache.get(attribute)
async def send(
self, command: RoborockCommand, params: dict[str, Any] | list[Any] | None = None
self,
command: RoborockCommand,
params: dict[str, Any] | list[Any] | int | None = None,
) -> dict:
"""Send a command to a vacuum cleaner."""
try:
@ -87,7 +89,7 @@ class RoborockCoordinatedEntity(
async def send(
self,
command: RoborockCommand,
params: dict[str, Any] | list[Any] | None = None,
params: dict[str, Any] | list[Any] | int | None = None,
) -> dict:
"""Overloads normal send command but refreshes coordinator."""
res = await super().send(command, params)