ca5b0a80148d3c883bb718e3af9a90dbcb9e26ce
Background task re-pushes the current color at ~timeout/2 (clamped 0.5-30s) while the light is on, so the server's idle timer never expires and the strip stays at the picked color instead of reverting to fallback_color. Drops the length: 9999 magic value from segment payloads now that the server defaults length to the remainder of the strip — requires the matching server change in led-grab.
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
Option 1: HACS (recommended)
- Install HACS if you have not already.
- Open HACS in Home Assistant.
- Click the three-dot menu, then Custom repositories.
- Add URL:
https://git.dolgolyov-family.by/alexei.dolgolyov/ledgrab-haos-integration - Set category to Integration and click Add.
- Search for "LedGrab" in HACS and click Download.
- Restart Home Assistant.
- Go to Settings > Devices & Services > Add Integration and search for "LedGrab".
- 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
- Verify the component exists: check that
config/custom_components/ledgrab/is present. - Clear the browser cache and hard-refresh the HA UI.
- Restart Home Assistant.
- Check logs at Settings > System > Logs and search for
ledgrab.
License
MIT
Languages
Python
100%