chore: Projektgeruest, Manifest, Konstanten und CI
This commit is contained in:
@@ -0,0 +1 @@
|
||||
"""The ninlight integration."""
|
||||
@@ -0,0 +1,34 @@
|
||||
"""Constants for the ninlight integration. Deliberately free of Home Assistant imports."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from typing import Final
|
||||
|
||||
DOMAIN: Final = "ninlight"
|
||||
|
||||
# Public default token of the ninlight firmware (CMakeLists.txt of the firmware repo).
|
||||
DEFAULT_TOKEN: Final = "aabbccddeeff0011223344"
|
||||
|
||||
CONF_SCAN_INTERVAL: Final = "scan_interval"
|
||||
CONF_LAMP_BASE_URL: Final = "lamp_base_url"
|
||||
|
||||
DEFAULT_SCAN_INTERVAL: Final = 30
|
||||
MIN_SCAN_INTERVAL: Final = 10
|
||||
MAX_SCAN_INTERVAL: Final = 300
|
||||
|
||||
MAX_TRANSITION_MS: Final = 60_000
|
||||
|
||||
FIRMWARE_DIR_NAME: Final = "ninlight_firmware"
|
||||
CATALOG_SCAN_INTERVAL: Final = timedelta(minutes=5)
|
||||
SIGNAL_CATALOG_UPDATED: Final = f"{DOMAIN}_catalog_updated"
|
||||
|
||||
FIRMWARE_URL_PREFIX: Final = "/api/ninlight/firmware/"
|
||||
# len(secrets.token_urlsafe(32))
|
||||
FIRMWARE_KEY_LENGTH: Final = 43
|
||||
# The lamp rejects fw_update URLs longer than this (nl_api.c: get_string(cmd, "url", 8, 255)).
|
||||
MAX_LAMP_URL_LENGTH: Final = 255
|
||||
|
||||
OTA_POLL_INTERVAL_S: Final = 5.0
|
||||
# The firmware aborts a stalled download after 10 min; a dead peer can hang ~7 min in TCP.
|
||||
OTA_TIMEOUT_S: Final = 12 * 60.0
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"domain": "ninlight",
|
||||
"name": "ninlight",
|
||||
"codeowners": ["@ninharp"],
|
||||
"config_flow": true,
|
||||
"dependencies": ["http"],
|
||||
"documentation": "https://github.com/ninharp/ha-ninlight",
|
||||
"integration_type": "device",
|
||||
"iot_class": "local_polling",
|
||||
"issue_tracker": "https://github.com/ninharp/ha-ninlight/issues",
|
||||
"requirements": [],
|
||||
"version": "0.1.0",
|
||||
"zeroconf": [{ "type": "_ninlight._tcp.local." }]
|
||||
}
|
||||
Reference in New Issue
Block a user