feat: Redesigned settings page with new layout and theme support#118
feat: Redesigned settings page with new layout and theme support#118
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughBumps TFT/min versions to 17.2; refactors HMI settings and images; enhances SVG font builder and cheatsheet copy UX; adds Nextion “canvas” documentation; improves ESPHome memory diagnostics and Nextion command/upload settings; small CI/workflow and script wrapper tweaks. Changes
Sequence Diagram(s)sequenceDiagram
participant HA as Home Assistant
participant ESP as ESPHome (nspanel addon)
participant NX as Nextion TFT
HA->>ESP: esphome.<panel>_command (canvas draw commands)
ESP->>NX: send Nextion commands (fill, xstr, line, cirs) with spacing
NX-->>ESP: ack / device info (dump_device_info)
ESP-->>HA: sensor.<panel>_current_page updates (e.g., "canvas")
Estimated code review effort🎯 4 (Complex) | ⏱️ ~55 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (3)
esphome/nspanel_esphome_addon_upload_tft.yaml (1)
75-76: Document that this is an intentional placeholder URL.In isolation this now looks broken. A short comment that the add-on’s
upload_tftflow always overwritestft_urlviadisp1->set_tft_url(...)before uploading would make the intent obvious.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@esphome/nspanel_esphome_addon_upload_tft.yaml` around lines 75 - 76, Add a short inline comment documenting that the tft_url entry is an intentional placeholder and will be overwritten at runtime: mention that the YAML block uses id: !extend disp1 and that the add-on’s upload_tft flow calls disp1->set_tft_url(...) to set the real URL before uploading so reviewers know the "http://x/x.tft" value is not used in production.esphome/nspanel_esphome_hw_memory.yaml (2)
24-26: Drop the stale cleanup note.Now that
minimum_chip_revisionis already set on Line 24, the “Remove after implementing” comment is outdated and likely to confuse the next person touching this block.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@esphome/nspanel_esphome_hw_memory.yaml` around lines 24 - 26, Remove the stale cleanup note by deleting the commented-out sdkconfig_options block and the inline comment referencing CONFIG_ESP32_REV_MIN_3 since minimum_chip_revision is already set; specifically remove the lines containing "sdkconfig_options:" and "CONFIG_ESP32_REV_MIN_3: y # Remove after implementing `minimum_chip_revision`" so only the active minimum_chip_revision setting remains.
42-47: Move these system headers out of the lambda body.These
#includes are emitted into the generated function body. That only stays safe as long as those headers were already pulled in earlier; otherwise their block-scopeextern "C"/ namespace-scope declarations can break compilation. Moving them to a file-scope include/helper would make this robust.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@esphome/nspanel_esphome_hw_memory.yaml` around lines 42 - 47, The three system headers (`#include` <esp_heap_caps.h>, <freertos/FreeRTOS.h>, <freertos/task.h>) must be moved out of the inline lambda body in the "then" block to file-scope to avoid emitting includes inside a generated function; pull these includes into a file-scope helper (or the YAML top-level includes) and implement a small file-scope helper function (e.g., report_memory() or nspanel_report_memory()) that uses those APIs, then call that helper from the lambda in the "then" section so the lambda contains only a call to the helper.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/scripts/build_mdi_fonts.py:
- Around line 373-378: The .icon card still shows click affordance even though
clicks moved to inner spans (classes "glyph", "name", "cp"); remove the
card-level affordance by eliminating any onclick on the outer div and removing
pointer/hover styles from the .icon selector in the CSS (or explicitly set .icon
{ cursor: default; } and remove :hover highlight), so only the inner spans keep
clickable styling/behavior; alternatively, if you want the whole card clickable,
move the onclick from the spans back to the .icon element and update the handler
accordingly.
In `@docs/page_canvas.md`:
- Around line 263-271: The two ASCII diagram code fences in docs/page_canvas.md
(the blocks starting with "(0,0) ────────────────────── (449,0) ← 450px visible
width" and the second block starting "(0,0) ──────────── (319,0) ← 320px
visible width") are using bare triple backticks and trigger MD040; change both
opening fences to include a non-rendered language such as text (i.e., ```text)
so markdownlint stops flagging them, keeping the diagram content unchanged.
In `@hmi/dev/nspanel_landscape_code/settings.txt`:
- Around line 46-54: settings.txt references light-theme picture IDs 88-94 (e.g.
brightslider.pic=89, dimslider.pic=91, bt_reboot_pic.pic=92) but
generate_images.sh currently only produces 81-87, so those assets are missing;
fix by either extending generate_images.sh to also generate pics 88-94 with the
correct filenames/IDs (same naming scheme as 81-87) or add the missing static
image files into the pics directory and ensure their IDs match 88-94, then
update generate_images.sh or the repo assets so brightslider.pic, dimslider.pic,
bt_sleep_pic, bt_theme_pic and related settings point to real files.
- Around line 414-427: The bt_reboot_hs hotspot lacks an Events section and thus
no Touch Press handler; add an Events block under Hotspot bt_reboot_hs mirroring
the pattern used by bt_sleep_hs and bt_theme_hs that defines a Touch Press event
which triggers the reboot action (e.g., navigate to the reboot confirmation
screen or call the existing onRebootPress/onRebootHandler). Ensure the new
Events entry uses the same send behavior (press/release) and effect settings as
the other hotspots so the button becomes interactive.
In `@hmi/dev/nspanel_portrait_code/settings.txt`:
- Around line 46-54: The settings reference light-theme image IDs for sliders
and buttons (brightslider.pic, brightslider.pic1, dimslider.pic, dimslider.pic1,
bt_reboot_pic.pic, bt_sleep_pic.pic, bt_theme_pic.pic) but generate_images.sh
doesn't produce images for IDs 88–94; update generate_images.sh to generate the
missing light-theme assets (IDs 88–94) or modify the generation mapping so these
names map to existing generated files, and ensure the script creates files with
the expected filenames/IDs for the portrait light theme.
- Around line 414-427: The hotspot bt_reboot_hs is missing a Touch Press Event
handler so taps do nothing; add a Touch Press Event to bt_reboot_hs that invokes
the same reboot action used by the landscape variant (wire the hotspot to the
existing reboot handler or emit the same component ID on press/release), ensure
the event target matches the existing reboot routine and that Send Component ID
remains set to on press and release so behavior is consistent across portrait
and landscape.
In `@nspanel_easy_blueprint.yaml`:
- Line 9: Replace the placeholder CalVer "9999.99.9" with the actual release
CalVer used for this blueprint and ensure the same value is used wherever the
sentinel appears (e.g., the top-level name field and the blueprint_version
entry). Update the "name: NSPanel Easy Configuration (v9999.99.9)" string and
the "blueprint_version: 9999.99.9" value to the real CalVer (and mirror that
value for any related keys such as min_blueprint_version or min_tft_version if
present) so the calver_gte() compatibility checks use the correct release
version.
---
Nitpick comments:
In `@esphome/nspanel_esphome_addon_upload_tft.yaml`:
- Around line 75-76: Add a short inline comment documenting that the tft_url
entry is an intentional placeholder and will be overwritten at runtime: mention
that the YAML block uses id: !extend disp1 and that the add-on’s upload_tft flow
calls disp1->set_tft_url(...) to set the real URL before uploading so reviewers
know the "http://x/x.tft" value is not used in production.
In `@esphome/nspanel_esphome_hw_memory.yaml`:
- Around line 24-26: Remove the stale cleanup note by deleting the commented-out
sdkconfig_options block and the inline comment referencing
CONFIG_ESP32_REV_MIN_3 since minimum_chip_revision is already set; specifically
remove the lines containing "sdkconfig_options:" and "CONFIG_ESP32_REV_MIN_3: y
# Remove after implementing `minimum_chip_revision`" so only the active
minimum_chip_revision setting remains.
- Around line 42-47: The three system headers (`#include` <esp_heap_caps.h>,
<freertos/FreeRTOS.h>, <freertos/task.h>) must be moved out of the inline lambda
body in the "then" block to file-scope to avoid emitting includes inside a
generated function; pull these includes into a file-scope helper (or the YAML
top-level includes) and implement a small file-scope helper function (e.g.,
report_memory() or nspanel_report_memory()) that uses those APIs, then call that
helper from the lambda in the "then" section so the lambda contains only a call
to the helper.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: 2ff073ff-fce9-400f-a916-65e440aacda1
⛔ Files ignored due to path filters (35)
hmi/dev/ui/landscape-white/81.pngis excluded by!**/*.pnghmi/dev/ui/landscape-white/82.pngis excluded by!**/*.pnghmi/dev/ui/landscape-white/83.pngis excluded by!**/*.pnghmi/dev/ui/landscape-white/84.pngis excluded by!**/*.pnghmi/dev/ui/landscape-white/85.pngis excluded by!**/*.pnghmi/dev/ui/landscape-white/86.pngis excluded by!**/*.pnghmi/dev/ui/landscape-white/87.pngis excluded by!**/*.pnghmi/dev/ui/landscape/81.pngis excluded by!**/*.pnghmi/dev/ui/landscape/82.pngis excluded by!**/*.pnghmi/dev/ui/landscape/83.pngis excluded by!**/*.pnghmi/dev/ui/landscape/84.pngis excluded by!**/*.pnghmi/dev/ui/landscape/85.pngis excluded by!**/*.pnghmi/dev/ui/landscape/86.pngis excluded by!**/*.pnghmi/dev/ui/landscape/87.pngis excluded by!**/*.pnghmi/dev/ui/landscape/NSPanel - EU.pptxis excluded by!**/*.pptxhmi/dev/ui/pics/60x60_button_dark_gray.pngis excluded by!**/*.pnghmi/dev/ui/pics/brightness_bar_horizontal_blue.pngis excluded by!**/*.pnghmi/dev/ui/pics/brightness_bar_horizontal_gray.pngis excluded by!**/*.pnghmi/dev/ui/pics/brightness_bar_vertical_blue.pngis excluded by!**/*.pnghmi/dev/ui/pics/brightness_bar_vertical_gray.pngis excluded by!**/*.pnghmi/dev/ui/portrait-white/81.pngis excluded by!**/*.pnghmi/dev/ui/portrait-white/82.pngis excluded by!**/*.pnghmi/dev/ui/portrait-white/83.pngis excluded by!**/*.pnghmi/dev/ui/portrait-white/84.pngis excluded by!**/*.pnghmi/dev/ui/portrait-white/85.pngis excluded by!**/*.pnghmi/dev/ui/portrait-white/86.pngis excluded by!**/*.pnghmi/dev/ui/portrait-white/87.pngis excluded by!**/*.pnghmi/dev/ui/portrait/81.pngis excluded by!**/*.pnghmi/dev/ui/portrait/82.pngis excluded by!**/*.pnghmi/dev/ui/portrait/83.pngis excluded by!**/*.pnghmi/dev/ui/portrait/84.pngis excluded by!**/*.pnghmi/dev/ui/portrait/85.pngis excluded by!**/*.pnghmi/dev/ui/portrait/86.pngis excluded by!**/*.pnghmi/dev/ui/portrait/87.pngis excluded by!**/*.pnghmi/dev/ui/portrait/NSPanel - US.pptxis excluded by!**/*.pptx
📒 Files selected for processing (17)
.github/scripts/build_mdi_fonts.py.github/scripts/build_mdi_fonts.shdocs/icons/cheatsheet.htmldocs/page_canvas.mdesphome/nspanel_esphome_addon_upload_tft.yamlesphome/nspanel_esphome_hw_display.yamlesphome/nspanel_esphome_hw_memory.yamlhmi/dev/nspanel_landscape_code/boot.txthmi/dev/nspanel_landscape_code/settings.txthmi/dev/nspanel_portrait_code/boot.txthmi/dev/nspanel_portrait_code/settings.txthmi/dev/scripts/generate_images.shhmi/nspanel_landscape.hmihmi/nspanel_landscape.tfthmi/nspanel_portrait.hmihmi/nspanel_portrait.tftnspanel_easy_blueprint.yaml
| f' <div class="icon">\n' | ||
| f' <span class="glyph" onclick="copy(this,\'{char}\',\'glyph\',\'{full}\')">{char}</span>\n' | ||
| f' <span class="name" onclick="copy(this,\'mdi:{name}\',\'name\',\'{full}\')">' | ||
| f'mdi:{name}</span>\n' | ||
| f' <span class="cp" onclick="copy(this,\'{zi_str}\',\'code\',\'{full}\')">' | ||
| f'{zi_str}</span>\n' |
There was a problem hiding this comment.
The card still advertises itself as clickable.
After moving the handlers to the three inner spans, the unused area of each .icon tile becomes a dead click zone because the card keeps its existing pointer/hover affordance. Either keep a default card-level action or remove the card-level affordance.
Also applies to: 418-423
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/scripts/build_mdi_fonts.py around lines 373 - 378, The .icon card
still shows click affordance even though clicks moved to inner spans (classes
"glyph", "name", "cp"); remove the card-level affordance by eliminating any
onclick on the outer div and removing pointer/hover styles from the .icon
selector in the CSS (or explicitly set .icon { cursor: default; } and remove
:hover highlight), so only the inner spans keep clickable styling/behavior;
alternatively, if you want the whole card clickable, move the onclick from the
spans back to the .icon element and update the handler accordingly.
| // Sliders | ||
| brightslider.pic=89 | ||
| brightslider.pic1=88 | ||
| dimslider.pic=91 | ||
| dimslider.pic1=90 | ||
| // Action buttons | ||
| bt_reboot_pic.pic=92 | ||
| bt_sleep_pic.pic=93 | ||
| bt_theme_pic.pic=94 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if light theme images 88-94 exist as static assets
echo "=== Checking for static assets 88-94 in pics directory ==="
for i in {88..94}; do
fd -t f "^${i}\.(png|jpg)$" hmi/dev/ui/pics/ 2>/dev/null || echo "Missing: $i.png"
done
echo ""
echo "=== Listing all numbered pics in the directory ==="
fd -t f '^\d+\.(png|jpg)$' hmi/dev/ui/pics/ | sort -V | tail -20Repository: edwardtfn/NSPanel-Easy
Length of output: 636
🏁 Script executed:
#!/bin/bash
# Examine generate_images.sh to see what pic IDs it generates
echo "=== Searching for generate_images.sh ==="
fd -t f "generate_images.sh" hmi/
echo ""
echo "=== Content of generate_images.sh (looking for pic ID ranges) ==="
cat hmi/dev/ui/generate_images.sh | head -100
echo ""
echo "=== Searching for all references to pic IDs 81-94 in code files ==="
rg -t text "pic(1)?=\s*(8[1-9]|9[0-4])" hmi/dev/Repository: edwardtfn/NSPanel-Easy
Length of output: 385
🏁 Script executed:
#!/bin/bash
# Read the generate_images.sh script from correct path
echo "=== Content of generate_images.sh ==="
cat -n hmi/dev/scripts/generate_images.sh | head -150
echo ""
echo "=== Searching for pic ID assignments 81-94 ==="
rg "pic(1)?=\s*(8[1-9]|9[0-4])" hmi/dev/ -A 2
echo ""
echo "=== Full extent of pics directory ==="
fd -t f '\d+\.(png|jpg)$' hmi/dev/ui/pics/ | rg '\d+\.(png|jpg)$' -o | sed 's/[^0-9]//g' | sort -n | tail -30Repository: edwardtfn/NSPanel-Easy
Length of output: 12212
🏁 Script executed:
#!/bin/bash
# Verify the issue affects both landscape and portrait
echo "=== Checking portrait settings.txt for same issue ==="
rg "pic(1)?=\s*(8[8-9]|9[0-4])" hmi/dev/nspanel_portrait_code/settings.txt -A 1 -B 1
echo ""
echo "=== Checking if pics 88-94 might be in any other location ==="
fd -t f '\d+\.(png|jpg)$' hmi/dev/ui/ | grep -E '(8[8-9]|9[0-4])\.(png|jpg)$'
echo ""
echo "=== Check all landscape variants in hmi/dev ==="
fd -t f "settings.txt" hmi/dev/nspanel*landscape* | while read f; do
echo "File: $f"
grep -E "pic(1)?=\s*(8[8-9]|9[0-4])" "$f" | wc -l
doneRepository: edwardtfn/NSPanel-Easy
Length of output: 624
Light theme picture IDs 88-94 are not generated by generate_images.sh.
The Preinitialize Event in settings.txt sets light theme slider pics to 88-91 and action button pics to 92-94, but generate_images.sh only generates pic IDs 81-87. These light theme assets do not exist as static files in the pics directory. Either add generation for pics 88-94 to the image generation script, or provide them as static assets.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@hmi/dev/nspanel_landscape_code/settings.txt` around lines 46 - 54,
settings.txt references light-theme picture IDs 88-94 (e.g. brightslider.pic=89,
dimslider.pic=91, bt_reboot_pic.pic=92) but generate_images.sh currently only
produces 81-87, so those assets are missing; fix by either extending
generate_images.sh to also generate pics 88-94 with the correct filenames/IDs
(same naming scheme as 81-87) or add the missing static image files into the
pics directory and ensure their IDs match 88-94, then update generate_images.sh
or the repo assets so brightslider.pic, dimslider.pic, bt_sleep_pic,
bt_theme_pic and related settings point to real files.
| Hotspot bt_reboot_hs | ||
| Attributes | ||
| ID : 9 | ||
| Scope : local | ||
| Dragging : 0 | ||
| Send Component ID : on press and release | ||
| Opacity : 127 | ||
| x coordinate : 240 | ||
| y coordinate : 38 | ||
| Width : 65 | ||
| Height : 45 | ||
| Effect : load | ||
| Effect Priority : 0 | ||
| Effect Time : 300 | ||
| Fill : solid color | ||
| Style : flat | ||
| Font ID : 10 | ||
| Back. Color (Unpressed) : 6339 | ||
| Back. Picture ID (Pressed): 65535 | ||
| Back. Color (Pressed) : 6339 | ||
| Font Color (Unpressed) : 65535 | ||
| Font Color (Pressed) : 1055 | ||
| Horizontal Alignment : center | ||
| Vertical Alignment : center | ||
| State : unpressed | ||
| Text : \xee\x9c\x88 | ||
| Max. Text Size : 3 | ||
| Word wrap : disabled | ||
| Horizontal Spacing : 0 | ||
| Vertical Spacing : 0 | ||
|
|
||
| Dual-state Button bt_sleep | ||
| Attributes | ||
| ID : 10 | ||
| Scope : local | ||
| Dragging : 0 | ||
| Send Component ID : on press and release | ||
| Opacity : 127 | ||
| x coordinate : 240 | ||
| y coordinate : 87 | ||
| Width : 65 | ||
| Height : 45 | ||
| Effect : load | ||
| Effect Priority : 0 | ||
| Effect Time : 300 | ||
| Fill : solid color | ||
| Style : flat | ||
| Font ID : 10 | ||
| Back. Color (Unpressed) : 6339 | ||
| Back. Picture ID (Pressed): 65535 | ||
| Back. Color (Pressed) : 6339 | ||
| Font Color (Unpressed) : 65535 | ||
| Font Color (Pressed) : 1055 | ||
| Horizontal Alignment : center | ||
| Vertical Alignment : center | ||
| State : unpressed | ||
| Text : \xee\xa8\x98 | ||
| Max. Text Size : 3 | ||
| Word wrap : disabled | ||
| Horizontal Spacing : 0 | ||
| Vertical Spacing : 0 | ||
|
|
||
| Hotspot bt_bright_down | ||
| Attributes | ||
| ID : 12 | ||
| ID : 18 | ||
| Scope : local | ||
| Dragging : 0 | ||
| Send Component ID: on press and release | ||
| Opacity : 127 | ||
| x coordinate : 78 | ||
| y coordinate : 170 | ||
| Width : 60 | ||
| Height : 60 | ||
| x coordinate : 52 | ||
| y coordinate : 205 | ||
| Width : 70 | ||
| Height : 70 | ||
| Effect : load | ||
| Effect Priority : 0 | ||
| Effect Time : 300 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if portrait settings.txt has the same issue or has an event handler for bt_reboot_hs
rg -A 10 'Hotspot bt_reboot_hs' hmi/dev/nspanel_portrait_code/settings.txtRepository: edwardtfn/NSPanel-Easy
Length of output: 393
🏁 Script executed:
#!/bin/bash
# Get the complete definitions of all three hotspots in the landscape variant
echo "=== bt_reboot_hs (complete) ==="
rg -A 20 'Hotspot bt_reboot_hs' hmi/dev/nspanel_landscape_code/settings.txt | head -30
echo -e "\n=== bt_sleep_hs (for comparison) ==="
rg -A 20 'Hotspot bt_sleep_hs' hmi/dev/nspanel_landscape_code/settings.txt | head -30
echo -e "\n=== bt_theme_hs (for comparison) ==="
rg -A 20 'Hotspot bt_theme_hs' hmi/dev/nspanel_landscape_code/settings.txt | head -30Repository: edwardtfn/NSPanel-Easy
Length of output: 1879
bt_reboot_hs hotspot is missing its Touch Press Event handler.
The hotspot has no Events section defined. In contrast, bt_sleep_hs and bt_theme_hs both include Touch Press Events that trigger their respective actions (navigating to screensaver and theme settings). Without an event handler, tapping the reboot button will have no effect.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@hmi/dev/nspanel_landscape_code/settings.txt` around lines 414 - 427, The
bt_reboot_hs hotspot lacks an Events section and thus no Touch Press handler;
add an Events block under Hotspot bt_reboot_hs mirroring the pattern used by
bt_sleep_hs and bt_theme_hs that defines a Touch Press event which triggers the
reboot action (e.g., navigate to the reboot confirmation screen or call the
existing onRebootPress/onRebootHandler). Ensure the new Events entry uses the
same send behavior (press/release) and effect settings as the other hotspots so
the button becomes interactive.
| // Sliders | ||
| brightslider.pic=89 | ||
| brightslider.pic1=88 | ||
| dimslider.pic=91 | ||
| dimslider.pic1=90 | ||
| // Action buttons | ||
| bt_reboot_pic.pic=92 | ||
| bt_sleep_pic.pic=93 | ||
| bt_theme_pic.pic=94 |
There was a problem hiding this comment.
Light theme picture IDs 88-94 referenced but not generated.
Same issue as landscape variant: light theme slider pics (88-91) and action button pics (92-94) are referenced but not generated by generate_images.sh.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@hmi/dev/nspanel_portrait_code/settings.txt` around lines 46 - 54, The
settings reference light-theme image IDs for sliders and buttons
(brightslider.pic, brightslider.pic1, dimslider.pic, dimslider.pic1,
bt_reboot_pic.pic, bt_sleep_pic.pic, bt_theme_pic.pic) but generate_images.sh
doesn't produce images for IDs 88–94; update generate_images.sh to generate the
missing light-theme assets (IDs 88–94) or modify the generation mapping so these
names map to existing generated files, and ensure the script creates files with
the expected filenames/IDs for the portrait light theme.
| Hotspot bt_reboot_hs | ||
| Attributes | ||
| ID : 12 | ||
| Scope : local | ||
| Dragging : 0 | ||
| Send Component ID: on press and release | ||
| Opacity : 127 | ||
| x coordinate : 0 | ||
| y coordinate : 257 | ||
| Width : 45 | ||
| Height : 60 | ||
| Effect : load | ||
| Effect Priority : 0 | ||
| Effect Time : 300 | ||
|
|
||
| Events | ||
| Touch Release Event | ||
| if(brightslider.val>0) | ||
| { | ||
| brightslider.val-- | ||
| covx brightslider.val,bright_text.txt,0,0 | ||
| bright_text.txt+="%" | ||
| printh 91 | ||
| prints "brightslider",0 | ||
| printh 00 | ||
| prints brightslider.val,0 | ||
| printh FF FF FF | ||
| } | ||
|
|
||
| Hotspot bt_bright_up | ||
| Attributes | ||
| ID : 13 | ||
| ID : 18 | ||
| Scope : local | ||
| Dragging : 0 | ||
| Send Component ID: on press and release | ||
| Opacity : 127 | ||
| x coordinate : 274 | ||
| y coordinate : 255 | ||
| Width : 43 | ||
| Height : 60 | ||
| x coordinate : 30 | ||
| y coordinate : 363 | ||
| Width : 70 | ||
| Height : 70 | ||
| Effect : load | ||
| Effect Priority : 0 | ||
| Effect Time : 300 |
There was a problem hiding this comment.
bt_reboot_hs hotspot has no Touch Press Event defined.
Same issue as the landscape variant: the reboot hotspot has no event handler, meaning taps will have no effect. Both variants need this fixed for consistency.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@hmi/dev/nspanel_portrait_code/settings.txt` around lines 414 - 427, The
hotspot bt_reboot_hs is missing a Touch Press Event handler so taps do nothing;
add a Touch Press Event to bt_reboot_hs that invokes the same reboot action used
by the landscape variant (wire the hotspot to the existing reboot handler or
emit the same component ID on press/release), ensure the event target matches
the existing reboot routine and that Send Component ID remains set to on press
and release so behavior is consistent across portrait and landscape.
| --- | ||
| blueprint: | ||
| name: NSPanel Easy Configuration (v2026.4.14) | ||
| name: NSPanel Easy Configuration (v9999.99.9) |
There was a problem hiding this comment.
Replace placeholder version 9999.99.9 with a real CalVer release value.
At Line 4060, blueprint_version: 9999.99.9 makes the ESPHome calver_gte() compatibility gate effectively always pass, which weakens version-mismatch protection; Line 9 then exposes the same placeholder in UI metadata. Use the actual release CalVer (same value in both places) so minimum-version enforcement remains meaningful.
Suggested fix
- name: NSPanel Easy Configuration (v9999.99.9)
+ name: NSPanel Easy Configuration (v2026.4.15)
...
- blueprint_version: 9999.99.9
+ blueprint_version: 2026.4.15Based on learnings: “bumping min_tft_version ... and setting min_blueprint_version: ${version} is intentional when a PR introduces new TFT globals/page events ...” — this depends on using a real synchronized version, not a sentinel that always passes checks.
Also applies to: 4060-4060
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@nspanel_easy_blueprint.yaml` at line 9, Replace the placeholder CalVer
"9999.99.9" with the actual release CalVer used for this blueprint and ensure
the same value is used wherever the sentinel appears (e.g., the top-level name
field and the blueprint_version entry). Update the "name: NSPanel Easy
Configuration (v9999.99.9)" string and the "blueprint_version: 9999.99.9" value
to the real CalVer (and mirror that value for any related keys such as
min_blueprint_version or min_tft_version if present) so the calver_gte()
compatibility checks use the correct release version.
There was a problem hiding this comment.
This is generated by the release workflows
There was a problem hiding this comment.
@edwardtfn Got it — thanks for clarifying. If the release workflow stamps the real CalVer at merge/tag time, keeping v9999.99.9 in PR branches is fine. I’ll treat this as non-actionable in PRs and won’t flag it going forward. If helpful for future drive‑bys, a brief inline comment noting “version set by release workflow” near blueprint_version could reduce noise, but not required.
✏️ Learnings added
Learnt from: edwardtfn
Repo: edwardtfn/NSPanel-Easy PR: 118
File: nspanel_easy_blueprint.yaml:9-9
Timestamp: 2026-04-13T05:06:15.366Z
Learning: Repo: edwardtfn/NSPanel-Easy — Release process
Fact: PR branches may use a placeholder CalVer (e.g., 9999.99.9) in nspanel_easy_blueprint.yaml (both blueprint.name and variables.blueprint_version). The repository’s release workflows replace this placeholder with the real CalVer at release/merge time. Do not flag the placeholder as an issue during PR reviews.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
🧠 Learnings used
Learnt from: edwardtfn
Repo: edwardtfn/NSPanel-Easy PR: 65
File: nspanel_easy_blueprint.yaml:7756-7782
Timestamp: 2026-03-25T17:22:42.272Z
Learning: Repo: edwardtfn/NSPanel-Easy — PR `#65`
File: nspanel_easy_blueprint.yaml (entity_details_title_with_icon anchor around Lines 7756–7782)
Learning: As of PR `#65`, the blueprint intentionally writes the entity-details page header (page_label and icon_state) via the shared helper entity_details_title_with_icon. The helper uses page: "" (meaning “current page”) and is only invoked inside page_changed flows for the target details page, so it is safe from race conditions and avoids extra bytes on the wire. Previous guidance that media_player (page_label) and alarm (page_label/icon_state) owned these fields exclusively in ESPHome no longer applies; the blueprint may write these fields on those pages.
Learnt from: edwardtfn
Repo: edwardtfn/NSPanel-Easy PR: 16
File: nspanel_easy_blueprint.yaml:12420-12427
Timestamp: 2026-02-22T15:50:24.352Z
Learning: NSPanel-Easy blueprint: Treat versions.blueprint != blueprint_version as a communication/parallel-automation scenario by design; keep this check under the "Blueprint version not detected" (communication issue) branch rather than splitting it into a separate mismatch branch.
Learnt from: edwardtfn
Repo: edwardtfn/NSPanel-Easy PR: 37
File: nspanel_easy_blueprint.yaml:8754-8759
Timestamp: 2026-03-04T23:31:09.274Z
Learning: NSPanel-Easy (ESPHome/Blueprint): The script action component_val (defined in esphome/nspanel_esphome_api.yaml) accepts variables page (string), id (string), and val (int). In nspanel_easy_blueprint.yaml all esphome.*_component_val calls must pass the target component via id:, not component:.
Learnt from: edwardtfn
Repo: edwardtfn/NSPanel-Easy PR: 39
File: hmi/dev/nspanel_us_land_code/water_heater.txt:21-39
Timestamp: 2026-03-07T13:11:07.817Z
Learning: In NSPanel-Easy HMI water_heater pages (e.g., hmi/dev/nspanel_us_land_code/water_heater.txt and all other nspanel_*/water_heater.txt variants), the components page_label, target, value01_icon, value01, value02_icon, value02, value03_icon, value03, value04_icon, and value04 are intentionally always visible and must NOT be hidden in the Preinitialize Event. Only the conditional/dynamic elements (target_icon, current_temp, slider, decrease_temp, increase_temp, button01–button08) are hidden on entry and shown/repainted by the blueprint. Do not flag the always-visible elements as stale-flash issues.
Learnt from: edwardtfn
Repo: edwardtfn/NSPanel-Easy PR: 39
File: hmi/dev/nspanel_us_code/water_heater.txt:92-96
Timestamp: 2026-03-07T12:27:16.639Z
Learning: In NSPanel-Easy (edwardtfn/NSPanel-Easy), the `temp_step` local variable in `hmi/dev/nspanel_*/water_heater.txt` HMI pages is initialized with a placeholder value (e.g., 0 or 1) that is immediately overwritten by the blueprint when the water_heater page opens. Do NOT flag the initial value or inconsistencies across HMI variants as a bug — the runtime value is always set by the blueprint.
Learnt from: edwardtfn
Repo: edwardtfn/NSPanel-Easy PR: 1
File: esphome/nspanel_esphome_api.yaml:266-273
Timestamp: 2026-01-30T15:32:37.873Z
Learning: In the NSPanel Easy ESPHome project (edwardtfn/NSPanel-Easy), the scripts action_component_color, action_component_text, and action_component_val in esphome/nspanel_esphome_api.yaml intentionally do not implement the page == "mem" case. This is by design - other files extend these scripts using !extend to add page == "mem" handling for their specific memory variables (e.g., nspanel_esphome_version.yaml, nspanel_esphome_page_utilities.yaml, etc.). This is a valid modular architecture pattern.
Learnt from: edwardtfn
Repo: edwardtfn/NSPanel-Easy PR: 36
File: hmi/dev/nspanel_eu_code/light.txt:687-688
Timestamp: 2026-03-04T22:31:10.698Z
Learning: In the NSPanel Easy project (edwardtfn/NSPanel-Easy), the Nextion `tempslider` on the light page intentionally has its bounds inverted: `Upper range limit: 2000` and `Lower range limit: 6535` (lower > upper). This is by design to invert the Kelvin scale on the vertical slider so that the physical slider direction matches the expected warm/cool light UX. The blueprint (`nspanel_easy_blueprint.yaml`) correspondingly maps `min_color_temp_kelvin` to `tempslider.maxval` and `max_color_temp_kelvin` to `tempslider.minval`. This applies to all HMI variant files (eu, us, us_land, CJK variants) in `hmi/dev/`.
Learnt from: edwardtfn
Repo: edwardtfn/NSPanel-Easy PR: 39
File: nspanel_easy_blueprint.yaml:11311-11351
Timestamp: 2026-03-07T13:47:57.317Z
Learning: For the Water Heater page in nspanel_easy_blueprint.yaml, the components ["slider", "target_icon", "decrease_temp", "increase_temp"] must always be visible because the HMI handles their state/appearance. Avoid conditionally hiding them in the blueprint.
Learnt from: edwardtfn
Repo: edwardtfn/NSPanel-Easy PR: 107
File: esphome/nspanel_esphome_version.yaml:17-21
Timestamp: 2026-04-10T11:24:34.808Z
Learning: In `esphome/nspanel_esphome_version.yaml`, bumping `min_tft_version` (e.g., 17.0 → 17.1) and setting `min_blueprint_version: ${version}` is intentional when a PR introduces new TFT globals/page events (in `hmi/dev/…`) or new blueprint inputs that the corresponding TFT/blueprint must support. Do NOT flag these version floor bumps as breaking changes if the TFT and blueprint updates are included in the same PR.
Learnt from: edwardtfn
Repo: edwardtfn/NSPanel-Easy PR: 34
File: hmi/dev/nspanel_blank/blank.txt:74-74
Timestamp: 2026-03-04T16:57:45.689Z
Learning: In `hmi/dev/nspanel_blank/blank.txt`, the `version` variable (`Text`) intentionally uses a human-readable calendar/release string (e.g., `2026.3.0`) rather than the numeric TFT protocol version token (e.g., `4`) used by other pages. The blank/boot page is meant to display the release version visually, so this format difference from the numeric protocol token is by design and should not be flagged as a mismatch.
Learnt from: edwardtfn
Repo: edwardtfn/NSPanel-Easy PR: 97
File: esphome/nspanel_esphome_page_boot.yaml:71-77
Timestamp: 2026-04-06T09:40:28.570Z
Learning: In `esphome/nspanel_esphome_page_boot.yaml`, publishing `NAN` via `version_tft->publish_state(NAN)` when TFT version parsing fails is intentional. ESPHome marks the sensor as "unavailable" in Home Assistant when the state is NaN, which is the desired behavior for an unparseable TFT version. Do NOT suggest replacing `NAN` with `0.0f` as the invalid sentinel. Downstream comparisons (e.g., `version_tft->state < ${min_tft_version}`) returning `false` for NaN is an accepted trade-off; the `> 0` guards and explicit `std::isnan()` checks in other consumers already handle NaN correctly.
Learnt from: edwardtfn
Repo: edwardtfn/NSPanel-Easy PR: 57
File: hmi/dev/nspanel_easy_landscape/boot.txt:63-64
Timestamp: 2026-03-20T22:38:22.495Z
Learning: In `hmi/dev/nspanel_easy_landscape/boot.txt`, the `version` variable (global string, ID 6) stores the short 2-character TFT protocol version token (e.g., `10`), NOT a human-readable calendar/release string. `Max. Text Size: 3` is intentional and correct for this file. Do NOT flag it as too small. This is distinct from `hmi/dev/nspanel_blank/blank.txt`, where `version` intentionally holds a human-readable calendar release string (e.g., `2026.3.0`).
Learnt from: edwardtfn
Repo: edwardtfn/NSPanel-Easy PR: 94
File: docs/addon_cover.md:57-57
Timestamp: 2026-04-05T21:09:42.974Z
Learning: In edwardtfn/NSPanel-Easy, the `latest` Git tag exists as a GitHub release tag (https://github.com/edwardtfn/NSPanel-Easy/releases/tag/latest) that is automatically updated on every merge to main. Documentation examples referencing `ref: latest` in ESPHome remote_package configurations are correct and intentional — do not flag this as a missing or invalid ref.
Bumps the actions-official group with 1 update: [actions/github-script](https://github.com/actions/github-script). Updates `actions/github-script` from 8 to 9 - [Release notes](https://github.com/actions/github-script/releases) - [Commits](actions/github-script@v8...v9) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: '9' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions-official ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps the actions-versioning group with 1 update: [softprops/action-gh-release](https://github.com/softprops/action-gh-release). Updates `softprops/action-gh-release` from 2 to 3 - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](softprops/action-gh-release@v2...v3) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-version: '3' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions-versioning ... Signed-off-by: dependabot[bot] <support@github.com>
…ons-versioning-e24c266ee1 ci: bump softprops/action-gh-release from 2 to 3 in the actions-versioning group
…ons-official-556be15a16 ci: bump actions/github-script from 8 to 9 in the actions-official group
Settings page has been redesigned with a cleaner layout:
Also includes minor ESPHome memory optimizations to align with the latest ESP-IDF version.
Summary by CodeRabbit
New Features
Improvements
Bug Fixes
Config
Chores