Repository navigation
Add a button mode that opens an entity page on the panel - #423
Draft
jamesmulcahy wants to merge 1 commit into
Draft
jamesmulcahy wants to merge 1 commit into
jamesmulcahy wants to merge 1 commit into
Conversation
OPEN_ENTITY_PAGE tells the panel to open the entity page for buttonN_entity_page_topic when the button is pressed, without a round trip to the manager. The relay is left alone. Older firmware that receives mode 5 logs "Unknown button action" and does nothing; newer firmware paired with an older manager never receives it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 1, 2026
This branch has not been deployed
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.
Summary
This PR adds a button mode that tells the panel to open an entity's page when a physical button is pressed. It's the first step towards "physical button shortcuts", where a button opens a device's page or runs an action. The first user is a small mode that opens the first media player in the panel's room.
This PR only changes the manager ↔ panel interface. Nothing sends the new mode yet, and the change is additive.
Changes
NSPanelConfig.NSPanelButtonMode.OPEN_ENTITY_PAGE = 5: on press, the panel opens the entity page for the button's topic itself, without a round trip to the manager. The relay is left alone.NSPanelConfig.button1_entity_page_topic = 47andbutton2_entity_page_topic = 48: the state topic of the entity whose page the button opens. Empty for every other mode.The panel only needs the state topic:
EntityPage::show()already takes one, and every manager entity hasget_mqtt_state_topic(). So the same mode will work for lights, thermostats and media players. The manager decides which entity to send.Compatibility
default:branch of its button handler. It logs "Unknown button action" and does nothing.Generated code comes from
docker/protobuf/regenerate.sh. Onlyprotobuf_nspanelchanges.Follow-ups
OPEN_ENTITY_PAGEwith the first media player in the panel's room, in entities-page order. A room with no media player falls back toNOTIFY_MANAGER. The topic follows the room's entities: every change to them already reloads the manager, which resends each panel's config. Add a button mode that opens the room's first media player #425, with manager and Django tests.OPEN_ENTITY_PAGE. The page opens from the page-transition task, waking the screen from the screensaver. A press with the page already showing does nothing, and one with another entity's page showing switches entity. Buttons: open an entity page when the manager configures it NSPanelManager-firmware#64, which depends on the media player firmware PR (Media player support NSPanelManager-firmware#27).All three pieces have been run together against the dev stack and a QEMU-emulated panel.
I'm opening this as a draft, to get feedback on the message design before the follow-ups build on it.
🤖 Generated with Claude Code