Skip to content

Send scene_name and scene_id to HA scripts#368

Merged
tpanajott merged 1 commit intoNSPManager:develfrom
jamesmulcahy:send-scene-name-ha-script
Apr 30, 2026
Merged

Send scene_name and scene_id to HA scripts#368
tpanajott merged 1 commit intoNSPManager:develfrom
jamesmulcahy:send-scene-name-ha-script

Conversation

@jamesmulcahy
Copy link
Copy Markdown
Contributor

Summary

  • Extends the nspanelmanager context object introduced in Send room_name and room_id when triggering HA scripts #365 to also include scene_name and scene_id
  • scene_name and scene_id are always sent (including for global scenes), since they are inherent to the scene itself
  • room_name and room_id continue to be sent only for room-scoped scenes

This allows a single HA script to handle multiple behaviors by branching on nspanelmanager.scene_name.

🤖 Generated with Claude Code

Extends the context object introduced in NSPManager#365 so HA scripts also receive
the NSPanelManager scene name and id, allowing a single script to handle
multiple behaviors by branching on scene_name.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jamesmulcahy jamesmulcahy changed the base branch from main to devel April 30, 2026 05:11
@jamesmulcahy
Copy link
Copy Markdown
Contributor Author

@tpanajott As I was refactoring the rest of my scenes into scripts, I realized that some situations would be much easier to handle if I know the calling scene name, as it allows me to group some functionality into a single script, but branch the behavior based on the Scene name (in NSPM).

@tpanajott tpanajott merged commit 56e004a into NSPManager:devel Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants