* Fix JSON encoding crash when HomeKit characteristic values are NaN or Infinity
JSONEncoder throws EncodingError.invalidValue for NaN/Infinity doubles, causing
the accessories endpoint to silently return null via try?. Map these to JSON null
instead so /homekit/accessories encodes correctly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test: cover non-finite HomeKit numbers
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
- GET /homekit/scenes — list all scenes with id, name, homeId, type, isExecuting
- POST /homekit/scenes/:id/execute — execute a scene by UUID
Server:
- HomeKitManager: scenes property, scene(with:) lookup, executeScene() async
- HomeKitServer: route handling for GET and POST with homeKit-disabled guard
- HomeKitPayload/HomeKitMapper: CasaScene model and JSON serialization
UI:
- Sidebar: new Scenes section with 'All scenes' + per-scene rows
- Selecting a scene switches API docs to show scene-specific endpoints
- Scene filter dropdown mirrors existing accessory filter for consistency
- Accessory and scene selections are mutually exclusive