Skip to content

Add an All Lights entity for the whole chain - #17

Merged
bharvey88 merged 1 commit into
betafrom
feat/all-lights-entity
Aug 27, 2026
Merged

bharvey88 merged 1 commit into
betafrom
feat/all-lights-entity

Conversation

@bharvey88

Copy link
Copy Markdown
Contributor

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:

  - platform: partition
    id: all_lights
    name: "All Lights"
    default_transition_length: 0s
    segments:
      - { id: led_chain, from: 0, to: 36 }
    effects: *led_effects

It sits alongside the zones rather than replacing them, and the parent led_chain stays internal: 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 that from <= to and that both are inside num_leds.

Three supporting changes keep the entity state honest:

  • all_lights_off clears it, so it does not report on after a song ends and the zones go dark
  • on_shutdown in both variant files clears it, so a lit master does not survive into deep sleep
  • each play_song_* turns it off first, because a running All Lights effect and the zone effects would otherwise both rewrite the same buffer every 100 ms

All Lights sorts above Body Light on the Home Assistant device page.

Types of changes

  • Bugfix (fixed change that fixes an issue)
  • New feature (thanks!)
  • Breaking change (repair/feature that breaks existing functionality)
  • Dependency Update - Does not publish
  • Other - Does not publish
  • Website of github readme file update - Does not publish
  • Github workflows - Does not publish

Checklist / Checklijst:

  • The code change has been tested and works locally
  • The code change has not yet been tested

If user-visible functionality or configuration variables are added/modified:

  • Added/updated documentation for the web page

esphome config passes on both H-3.yaml and H-3D.yaml. Not yet tested on hardware.

🤖 Generated with Claude Code

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)
@bharvey88 bharvey88 added the new-feature New feature or request label Aug 27, 2026
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 408ee974-212c-448d-9f99-a787d62b3762


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bharvey88
bharvey88 merged commit d1e24e8 into beta Aug 27, 2026
10 checks passed
@bharvey88
bharvey88 deleted the feat/all-lights-entity branch August 27, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant