alexei.dolgolyov 705616f8b0 feat(playlists): expose scene playlists as Home Assistant entities
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).
2026-06-08 15:59:42 +03:00

LedGrab Home Assistant Integration

Custom Home Assistant integration for LedGrab — ambient lighting system that captures screen content and drives LED strips in real time.

Creates light, switch, sensor, number, and select entities for each configured device, allowing full control and automation from Home Assistant.

Installation

  1. Install HACS if you have not already.
  2. Open HACS in Home Assistant.
  3. Click the three-dot menu, then Custom repositories.
  4. Add URL: https://git.dolgolyov-family.by/alexei.dolgolyov/ledgrab-haos-integration
  5. Set category to Integration and click Add.
  6. Search for "LedGrab" in HACS and click Download.
  7. Restart Home Assistant.
  8. Go to Settings > Devices & Services > Add Integration and search for "LedGrab".
  9. Enter your server URL (e.g., http://192.168.1.100:8080) and API key.

Option 2: Manual

Copy the custom_components/ledgrab/ folder from this repository into your Home Assistant config/custom_components/ directory, then restart Home Assistant and add the integration as above.

Automation Example

automation:
  - alias: "Start ambient lighting when TV turns on"
    trigger:
      - platform: state
        entity_id: media_player.living_room_tv
        to: "on"
    action:
      - service: switch.turn_on
        target:
          entity_id: switch.living_room_tv_processing

  - alias: "Stop ambient lighting when TV turns off"
    trigger:
      - platform: state
        entity_id: media_player.living_room_tv
        to: "off"
    action:
      - service: switch.turn_off
        target:
          entity_id: switch.living_room_tv_processing

Requirements

  • Home Assistant 2023.1.0 or later
  • A running LedGrab server accessible on your network

Troubleshooting

  1. Verify the component exists: check that config/custom_components/ledgrab/ is present.
  2. Clear the browser cache and hard-refresh the HA UI.
  3. Restart Home Assistant.
  4. Check logs at Settings > System > Logs and search for ledgrab.

License

MIT

S
Description
No description provided
Readme MIT 137 KiB
Languages
Python 100%