feat(api): HTTP-Client fuer die ninlight-Lampen

This commit is contained in:
Michael Sauer
2026-09-16 15:01:06 +02:00
parent 18583c6593
commit d3688b5a2e
4 changed files with 475 additions and 0 deletions
+92
View File
@@ -0,0 +1,92 @@
"""Realistic lamp payloads. Values are deliberately NOT boundary values (see plan constraints)."""
from __future__ import annotations
from typing import Any
TOKEN = "3f9c2a71e6b04d58"
HOST_RGB = "192.168.2.22"
HOST_CW = "192.168.2.122"
MAC_RGB = "28:6d:cd:79:06:b8"
MAC_CW = "28:6d:cd:4e:0a:16"
STATE_RGB: dict[str, Any] = {
"on": True,
"brightness": 37,
"mode": "color",
"color": {"r": 12, "g": 200, "b": 90},
"color_temp": 3100,
"power_on_behaviour": "last",
"fade_in": 450,
"fade_out": 1250,
"transition_default": 700,
"wake_on_change": True,
"capabilities": {"color": True, "color_temp": [2700, 6500]},
}
STATE_CW: dict[str, Any] = {
"on": False,
"brightness": 63,
"mode": "white",
"color": {"r": 0, "g": 0, "b": 0},
"color_temp": 2350,
"power_on_behaviour": "on",
"fade_in": 300,
"fade_out": 900,
"transition_default": 250,
"wake_on_change": False,
"capabilities": {"color": False, "color_temp": [2000, 5000]},
}
INFO_RGB: dict[str, Any] = {
"device_type": "gu10_rgb",
"product_name": "Klyqa GU10 RGB CW/WW",
"fw_version": "0.3.8-36-gca9bb",
"build_date": "2026-09-14",
"mac": MAC_RGB,
"name": "",
"wifi": {
"mode": "sta",
"ssid": "ninIOT",
"rssi": -61,
"ip": HOST_RGB,
"sta_ip": HOST_RGB,
"error": None,
},
"uptime": 129832,
"free_heap": 119872,
"last_ota_error": None,
}
INFO_CW: dict[str, Any] = {
"device_type": "g95_cw",
"product_name": "Klyqa G95 CW/WW",
"fw_version": "0.3.8-36-gca9bb",
"build_date": "2026-09-14",
"mac": MAC_CW,
"name": "Wohnzimmer",
"wifi": {
"mode": "sta",
"ssid": "ninIOT",
"rssi": -70,
"ip": HOST_CW,
"sta_ip": HOST_CW,
"error": None,
},
"uptime": 5421,
"free_heap": 121344,
"last_ota_error": None,
}
SETTINGS_COMPILED: dict[str, Any] = {
"name": "",
"wifi": {"ssid": "", "source": "compiled"},
"auth_all": False,
}
SETTINGS_STORED: dict[str, Any] = {
"name": "",
"wifi": {"ssid": "ninIOT", "source": "stored"},
"auth_all": False,
}