"""Constants for the Ninlight integration.""" from __future__ import annotations from datetime import timedelta from typing import Final from homeassistant.const import Platform DOMAIN = "ninlight" PLATFORMS: Final = [Platform.LIGHT] CONF_TOKEN = "token" DEFAULT_PORT = 3333 DEFAULT_TOKEN = "aabbccddeeff0011223344" # The firmware has no push channel, so state is polled. A bulb answers in well under # a second on the LAN; 30 s keeps the UI honest without adding noticeable REST traffic # for a nine bulb setup. SCAN_INTERVAL = timedelta(seconds=30) # Mirror of NL_MAX_TRANSITION_MS in src/light/nl_control.h. MAX_TRANSITION_MS = 60000