Add an All Lights entity for the whole chain - #17
Merged
Merged
Conversation
Home Assistant exposed only the five zone partitions, so there was no way to control all 37 LEDs at once. Adds a sixth partition spanning 0-36 alongside the zones, leaving the parent chain internal. all_lights_off and both on_shutdown blocks clear it so the entity state matches the LEDs, and each play_song_* turns it off first so a running All Lights effect does not fight the zone effects writing the same buffer. Version 26.8.26.2 🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Version: 26.8.26.2
What does this implement/fix?
Home Assistant exposed only the five zone partitions (
Body,Mouth,Nose,Eyes,Hat), with no way to control all 37 LEDs at once. H-1 and H-2 both expose their strip as a single light; H-3 was the only ornament without a whole-ornament control.Adds a sixth partition spanning the full chain:
It sits alongside the zones rather than replacing them, and the parent
led_chainstaysinternal: true. Partitions write into the parent's buffer and the parent does the single transmit, so this adds no second driver on GPIO3. Overlapping coverage is valid: the partition platform validates only thatfrom <= toand that both are insidenum_leds.Three supporting changes keep the entity state honest:
all_lights_offclears it, so it does not reportonafter a song ends and the zones go darkon_shutdownin both variant files clears it, so a lit master does not survive into deep sleepplay_song_*turns it off first, because a running All Lights effect and the zone effects would otherwise both rewrite the same buffer every 100 msAll Lightssorts aboveBody Lighton the Home Assistant device page.Types of changes
Checklist / Checklijst:
If user-visible functionality or configuration variables are added/modified:
esphome configpasses on both H-3.yaml and H-3D.yaml. Not yet tested on hardware.🤖 Generated with Claude Code