pred_brain.exp.hue#
Minimal Philips Hue Bridge client.
The bridge connection, light listing, and light control use API v2. Light discovery uses the legacy API v1 endpoint because the v2 device resource endpoint is not the light-search command.
Endpoints:
GET /clip/v2/resource/bridgeverifies the bridge connection.POST /api/<application_key>/lightsstarts light discovery (API v1).GET /api/<application_key>/lights/newreturns the latest discovery result (API v1).GET /clip/v2/resource/lightlists lights (API v2).
- exception pred_brain.exp.hue.HueBridgeError#
Raised when the Hue Bridge cannot be contacted or rejects a request.
- pred_brain.exp.hue.load_hue_mapping(filepath: str) dict[str, str]#
Load a light-location mapping from a CSV file.
- pred_brain.exp.hue.save_hue_mapping(filepath: str, mapping: dict[str, str]) None#
Save a light-location mapping to a CSV file.