This commit is contained in:
Mateusz Gruszczyński
2026-09-15 18:47:20 +02:00
parent 7ffaba6c7a
commit 3d69e74319
37 changed files with 426 additions and 318 deletions
+36 -54
View File
@@ -2,9 +2,9 @@
"openapi": "3.1.0",
"info": {
"title": "GREE Controller API",
"version": "0.14.2",
"version": "0.14.4",
"summary": "Local HTTP/WebSocket API for GREE HVAC control",
"description": "Self-hosted API used by the GREE Controller Web UI and Home Assistant integration.\n\n### Authentication\nAdministrator endpoints accept `Authorization: Bearer <APP_TOKEN>` or `x-api-token: <APP_TOKEN>` when configured. Restricted Home Assistant control endpoints also accept generated integration tokens.\n\n### Local and GREE Cloud\nDevices use one API model and one command surface. `connection_type=local` is dispatched only to the existing LAN/UDP provider; `connection_type=gree_cloud` is dispatched only to the GREE Cloud provider. No automatic transport fallback is performed.\n\n### GREE Cloud security\nCloud passwords, REST/MQTT tokens, Authorization values and device cipher keys are never returned in normal API responses or Cloud diagnostics. MQTT uses TLS with certificate and hostname validation.\n\n### Energy\nGREE Cloud `ElcAll` and selected Home Assistant cumulative energy sensors are normalized to kWh and converted to consumption deltas before aggregation. Raw cumulative values are retained only as meter samples/baselines.\n\n### 0.14.2\nAdds independent vertical/horizontal swing controls across manual device control, thermostat zones, legacy automations, Visual Flow and Home Assistant zone climates. Swing is treated as an auxiliary one-shot unit setting and does not replace thermostat ownership.\n\n### 0.14.1\nAdds split/multisplit installation groups with shared energy and outdoor-temperature sources, multi-target energy charts with period comparison, cleaner Cloud status/alerts and safe MQTT cleanup after the last Cloud device is removed.\n\n### 0.14.0\nAdds first-class GREE Cloud MQTT status/control, reconnect/resubscribe lifecycle, Cloud diagnostics, per-device capabilities, Cloud/HA energy sources and energy-history aggregation while preserving the LAN transport contract.",
"description": "Self-hosted API used by the GREE Controller Web UI and Home Assistant integration.\n\n### Authentication\nAdministrator endpoints accept `Authorization: Bearer <APP_TOKEN>` or `x-api-token: <APP_TOKEN>` when configured. Restricted Home Assistant control endpoints also accept generated integration tokens.\n\n### Local and GREE Cloud\nDevices use one API model and one command surface. `connection_type=local` is dispatched only to the existing LAN/UDP provider; `connection_type=gree_cloud` is dispatched only to the GREE Cloud provider. No automatic transport fallback is performed.\n\n### GREE Cloud security\nCloud passwords, REST/MQTT tokens, Authorization values and device cipher keys are never returned in normal API responses or Cloud diagnostics. MQTT uses TLS with certificate and hostname validation.\n\n### Energy\nGREE Cloud `ElcAll` and selected Home Assistant cumulative energy sensors are normalized to kWh and converted to consumption deltas before aggregation. Raw cumulative values are retained only as meter samples/baselines.\n\n### 0.14.4\nHome Assistant connection tests validate only the configured server/API token and require no entity. `outdoor_entity_id` is the global Home Assistant outdoor-temperature sensor; zones can override it with `ha_outdoor_entity_id`. Room-temperature Home Assistant sensors remain configured per zone with `ha_entity_id`. Global/per-zone outdoor sensors are integrated with aliases, metrics/history and Visual Flow entity suggestions.\n\n### 0.14.2\nAdds independent vertical/horizontal swing controls across manual device control, thermostat zones, legacy automations, Visual Flow and Home Assistant zone climates. Swing is treated as an auxiliary one-shot unit setting and does not replace thermostat ownership.\n\n### 0.14.1\nAdds split/multisplit installation groups with shared energy and outdoor-temperature sources, multi-target energy charts with period comparison, cleaner Cloud status/alerts and safe MQTT cleanup after the last Cloud device is removed.\n\n### 0.14.0\nAdds first-class GREE Cloud MQTT status/control, reconnect/resubscribe lifecycle, Cloud diagnostics, per-device capabilities, Cloud/HA energy sources and energy-history aggregation while preserving the LAN transport contract.",
"license": {
"name": "MIT"
}
@@ -3076,19 +3076,9 @@
"tags": [
"Diagnostics"
],
"summary": "Test Home Assistant temperature",
"description": "Tests the configured Home Assistant connection and resolves a temperature from the supplied entity or controller default/alias.",
"summary": "Test Home Assistant connection",
"description": "Validates the configured Home Assistant URL and access token against the Home Assistant API root. No entity is required or read.",
"operationId": "testHomeAssistant",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HaTestRequest"
}
}
}
},
"security": [
{
"BearerToken": []
@@ -3099,7 +3089,7 @@
],
"responses": {
"200": {
"description": "Test result",
"description": "Connection test result",
"content": {
"application/json": {
"schema": {
@@ -3107,27 +3097,15 @@
"properties": {
"ok": {
"type": "boolean"
},
"temperature_c": {
"type": [
"number",
"null"
]
},
"entity_id": {
"type": "string"
}
},
"required": [
"ok",
"entity_id"
"ok"
],
"additionalProperties": false
},
"example": {
"ok": true,
"temperature_c": 23.4,
"entity_id": "sensor.room_temperature"
"ok": true
}
}
}
@@ -5497,7 +5475,7 @@
},
"version": {
"type": "string",
"example": "0.14.2"
"example": "0.14.4"
},
"uptime_seconds": {
"type": "integer",
@@ -6536,7 +6514,16 @@
"string",
"null"
],
"example": "sensor.living_room_temperature"
"example": "sensor.living_room_temperature",
"description": "Per-zone Home Assistant room-temperature entity. Required when sensor_source is home_assistant or combined."
},
"ha_outdoor_entity_id": {
"type": [
"string",
"null"
],
"example": "sensor.garden_temperature",
"description": "Optional per-zone Home Assistant outdoor-temperature override. When empty, the zone uses global outdoor_entity_id; when unavailable, control falls back to the global outdoor source."
},
"external_sensor_weight": {
"type": "number",
@@ -6586,6 +6573,20 @@
"type": "string",
"example": "gree-aabbccddeeff"
},
"ha_entity_id": {
"type": [
"string",
"null"
],
"description": "Per-zone Home Assistant room-temperature entity used by external/combined control."
},
"ha_outdoor_entity_id": {
"type": [
"string",
"null"
],
"description": "Optional per-zone Home Assistant outdoor-temperature override; empty uses global outdoor_entity_id."
},
"enabled": {
"type": "boolean"
},
@@ -7973,19 +7974,6 @@
],
"additionalProperties": false
},
"HaTestRequest": {
"type": "object",
"properties": {
"entity_id": {
"type": [
"string",
"null"
],
"description": "Optional. Defaults/aliases are resolved when omitted.",
"example": "sensor.room_temperature"
}
}
},
"HaEntityRequest": {
"type": "object",
"properties": {
@@ -8487,11 +8475,9 @@
"url": {
"type": "string"
},
"default_entity_id": {
"type": "string"
},
"outdoor_entity_id": {
"type": "string"
"type": "string",
"description": "Optional global Home Assistant outdoor-temperature entity. Zones use it by default and may override it with ha_outdoor_entity_id."
},
"sensor_stale_after_seconds": {
"type": "integer"
@@ -8521,7 +8507,6 @@
},
"required": [
"url",
"default_entity_id",
"outdoor_entity_id",
"sensor_stale_after_seconds",
"allow_invalid_tls",
@@ -8538,11 +8523,9 @@
"url": {
"type": "string"
},
"default_entity_id": {
"type": "string"
},
"outdoor_entity_id": {
"type": "string"
"type": "string",
"description": "Optional global Home Assistant outdoor-temperature entity. Zones use it by default and may override it with ha_outdoor_entity_id."
},
"sensor_stale_after_seconds": {
"type": "integer"
@@ -8576,7 +8559,6 @@
},
"required": [
"url",
"default_entity_id",
"outdoor_entity_id",
"sensor_stale_after_seconds",
"allow_invalid_tls",