v0.7.2
This commit is contained in:
@@ -82,6 +82,24 @@ class GreeControllerClient:
|
||||
raise GreeControllerApiError("Controller returned an invalid control plan payload")
|
||||
return data
|
||||
|
||||
async def groups(self) -> list[dict[str, Any]]:
|
||||
"""Return climate groups exposed to Home Assistant."""
|
||||
data = await self._request("GET", "/api/integrations/home-assistant/groups")
|
||||
if not isinstance(data, list):
|
||||
raise GreeControllerApiError("Controller returned an invalid groups payload")
|
||||
return data
|
||||
|
||||
async def group_control(self, group_id: str, payload: dict[str, Any]) -> dict[str, Any]:
|
||||
"""Change one controller climate group."""
|
||||
data = await self._request(
|
||||
"POST",
|
||||
f"/api/integrations/home-assistant/groups/{group_id}/control",
|
||||
json=payload,
|
||||
)
|
||||
if not isinstance(data, dict):
|
||||
raise GreeControllerApiError("Controller returned an invalid group control payload")
|
||||
return data
|
||||
|
||||
async def house_control(self, mode: str) -> dict[str, Any]:
|
||||
"""Change the whole-house thermostat mode."""
|
||||
data = await self._request(
|
||||
|
||||
Reference in New Issue
Block a user