This commit is contained in:
Mateusz Gruszczyński
2026-08-25 09:31:15 +02:00
parent 25e1a854e3
commit fd26d6877f
25 changed files with 460 additions and 99 deletions
@@ -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(