705616f8b0
One device per scene playlist (model "Scene Playlist"), each with: - a switch (start/stop; the server cycles one playlist at a time, so starting one stops any other) - a "Current Scene" sensor that resolves the active preset name from scene_presets while this playlist is cycling - an "Items" diagnostic sensor (configured scene count; no state_class) The coordinator reads scene_playlists plus the flat playlist_state from the /api/v1/snapshot payload and gains start_playlist()/stop_playlist(); __init__ registers and prunes per-playlist devices and reloads on playlist-id changes; the event listener also refreshes on the playlist_state_changed WS event. Shared device/lookup/running-state plumbing lives in a new LedGrabPlaylistEntity base (entity.py) used by both the switch and the sensors. Adds en/ru translation keys. Note: this also lands the in-progress coordinator migration from the per-request fan-out to the single /api/v1/snapshot poll that was already present in the working tree. Requires the led-grab server /api/v1/snapshot to emit scene_playlists + playlist_state (companion server change, tracked separately).
171 lines
4.0 KiB
JSON
171 lines
4.0 KiB
JSON
{
|
|
"config": {
|
|
"step": {
|
|
"user": {
|
|
"title": "Set up LED Screen Controller",
|
|
"description": "Enter the URL and API key for your LED Screen Controller server.",
|
|
"data": {
|
|
"server_name": "Server Name",
|
|
"server_url": "Server URL",
|
|
"api_key": "API Key"
|
|
},
|
|
"data_description": {
|
|
"server_name": "Display name for this server in Home Assistant",
|
|
"server_url": "URL of your LED Screen Controller server (e.g., http://192.168.1.100:8080)",
|
|
"api_key": "API key from your server's configuration file"
|
|
}
|
|
}
|
|
},
|
|
"error": {
|
|
"cannot_connect": "Failed to connect to server.",
|
|
"invalid_api_key": "Invalid API key.",
|
|
"unknown": "Unexpected error occurred."
|
|
},
|
|
"abort": {
|
|
"already_configured": "This server is already configured."
|
|
}
|
|
},
|
|
"entity": {
|
|
"button": {
|
|
"activate_scene": {
|
|
"name": "{scene_name}"
|
|
},
|
|
"sync_clock_reset": {
|
|
"name": "Reset"
|
|
}
|
|
},
|
|
"light": {
|
|
"api_input_light": {
|
|
"name": "Light"
|
|
}
|
|
},
|
|
"switch": {
|
|
"processing": {
|
|
"name": "Processing"
|
|
},
|
|
"sync_clock_running": {
|
|
"name": "Active"
|
|
},
|
|
"playlist_active": {
|
|
"name": "Active"
|
|
}
|
|
},
|
|
"sensor": {
|
|
"fps": {
|
|
"name": "FPS"
|
|
},
|
|
"status": {
|
|
"name": "Status",
|
|
"state": {
|
|
"processing": "Processing",
|
|
"idle": "Idle",
|
|
"error": "Error",
|
|
"unavailable": "Unavailable"
|
|
}
|
|
},
|
|
"mapped_lights": {
|
|
"name": "Mapped Lights"
|
|
},
|
|
"sync_clock_elapsed": {
|
|
"name": "Elapsed Time"
|
|
},
|
|
"playlist_current_scene": {
|
|
"name": "Current Scene"
|
|
},
|
|
"playlist_items": {
|
|
"name": "Scenes"
|
|
},
|
|
"server_cpu_percent": {
|
|
"name": "CPU Usage"
|
|
},
|
|
"server_ram_percent": {
|
|
"name": "RAM Usage"
|
|
},
|
|
"server_app_cpu_percent": {
|
|
"name": "App CPU Usage"
|
|
},
|
|
"server_app_ram": {
|
|
"name": "App Memory"
|
|
},
|
|
"server_gpu_utilization": {
|
|
"name": "GPU Usage"
|
|
},
|
|
"server_gpu_temp": {
|
|
"name": "GPU Temperature"
|
|
},
|
|
"server_cpu_temp": {
|
|
"name": "CPU Temperature"
|
|
},
|
|
"server_battery": {
|
|
"name": "Battery"
|
|
},
|
|
"server_last_restart": {
|
|
"name": "Last Restart"
|
|
},
|
|
"server_version": {
|
|
"name": "Server Version"
|
|
}
|
|
},
|
|
"number": {
|
|
"brightness": {
|
|
"name": "Brightness"
|
|
},
|
|
"ha_light_update_rate": {
|
|
"name": "Update Rate"
|
|
},
|
|
"ha_light_transition": {
|
|
"name": "Transition"
|
|
},
|
|
"ha_light_min_brightness": {
|
|
"name": "Min Brightness"
|
|
},
|
|
"ha_light_color_tolerance": {
|
|
"name": "Color Tolerance"
|
|
},
|
|
"api_input_timeout": {
|
|
"name": "Fallback Timeout"
|
|
},
|
|
"sync_clock_speed": {
|
|
"name": "Speed"
|
|
}
|
|
},
|
|
"select": {
|
|
"color_strip_source": {
|
|
"name": "Color Strip Source"
|
|
},
|
|
"brightness_source": {
|
|
"name": "Brightness Source"
|
|
},
|
|
"api_input_interpolation": {
|
|
"name": "Interpolation",
|
|
"state": {
|
|
"none": "None",
|
|
"linear": "Linear",
|
|
"nearest": "Nearest"
|
|
}
|
|
}
|
|
},
|
|
"update": {
|
|
"server_update": {
|
|
"name": "Server Update"
|
|
}
|
|
}
|
|
},
|
|
"services": {
|
|
"set_leds": {
|
|
"name": "Set LEDs",
|
|
"description": "Push segment data to an api_input color strip source.",
|
|
"fields": {
|
|
"source_id": {
|
|
"name": "Source ID",
|
|
"description": "The api_input CSS source ID (e.g., css_abc12345)."
|
|
},
|
|
"segments": {
|
|
"name": "Segments",
|
|
"description": "List of segment objects. start and length are optional (default to 0 and the rest of the strip); mode is one of solid/per_pixel/gradient with color or colors."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|