Add missing bashio::addon.ingress_panel() function#185
Add missing bashio::addon.ingress_panel() function#185frenck merged 3 commits intohassio-addons:mainfrom
Conversation
WalkthroughAdded a new public function Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant AddonsLib as "lib/addons.sh"
participant Supervisor as "Supervisor API (/addons/*/options)"
participant Cache as "Cache"
participant Logger
Caller->>AddonsLib: bashio::addon.ingress_panel(slug?, state?)
alt state provided (setter)
AddonsLib->>Supervisor: POST /addons/${slug}/options (JSON payload)
Supervisor-->>AddonsLib: HTTP 200 OK / non-OK
AddonsLib->>Cache: flush
alt non-OK
AddonsLib->>Logger: log error
AddonsLib-->>Caller: return NOK
else OK
AddonsLib-->>Caller: return OK
end
else state omitted (getter)
AddonsLib->>AddonsLib: read addons.${slug}.ingress_panel
AddonsLib-->>Caller: return value
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
|
not stale |
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
|
not stale |
There was a problem hiding this comment.
Pull request overview
Adds a missing Bashio helper to read or update an add-on’s ingress_panel option via the Supervisor API, aligning it with existing option-style helpers (e.g., auto_update, watchdog).
Changes:
- Add
bashio::addon.ingress_panel()to get the currentingress_panelstate (defaults tofalsewhen absent). - Add ability to set
ingress_panelfor a target add-on (orself) by POSTing to/addons/<slug>/optionsand flushing cache.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Proposed Changes
Tested, works.
Related Issues
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.