v0.6.5
This commit is contained in:
@@ -82,6 +82,39 @@ class GreeControllerClient:
|
||||
raise GreeControllerApiError("Controller returned an invalid control plan payload")
|
||||
return data
|
||||
|
||||
async def house_control(self, mode: str) -> dict[str, Any]:
|
||||
"""Change the whole-house thermostat mode."""
|
||||
data = await self._request(
|
||||
"POST",
|
||||
"/api/integrations/home-assistant/house/control",
|
||||
json={"mode": mode},
|
||||
)
|
||||
if not isinstance(data, dict):
|
||||
raise GreeControllerApiError("Controller returned an invalid house control payload")
|
||||
return data
|
||||
|
||||
async def house_preset(self, preset: str) -> dict[str, Any]:
|
||||
"""Change the whole-house work profile."""
|
||||
data = await self._request(
|
||||
"POST",
|
||||
"/api/integrations/home-assistant/house/preset",
|
||||
json={"preset": preset},
|
||||
)
|
||||
if not isinstance(data, dict):
|
||||
raise GreeControllerApiError("Controller returned an invalid house preset payload")
|
||||
return data
|
||||
|
||||
async def house_power(self, power: bool) -> dict[str, Any]:
|
||||
"""Turn all enabled air conditioners on or off."""
|
||||
data = await self._request(
|
||||
"POST",
|
||||
"/api/integrations/home-assistant/house/power",
|
||||
json={"power": power},
|
||||
)
|
||||
if not isinstance(data, dict):
|
||||
raise GreeControllerApiError("Controller returned an invalid house power payload")
|
||||
return data
|
||||
|
||||
async def zone_control(self, zone_id: str, payload: dict[str, Any]) -> dict[str, Any]:
|
||||
"""Change a zone thermostat override through the controller."""
|
||||
data = await self._request(
|
||||
|
||||
Reference in New Issue
Block a user