Skip to content

Fix ANSI codes for secret text hiding#893

Merged
jesserockz merged 3 commits intoesphome:mainfrom
swoboda1337:fix-ansi-secret-codes
Apr 8, 2026
Merged

Fix ANSI codes for secret text hiding#893
jesserockz merged 3 commits intoesphome:mainfrom
swoboda1337:fix-ansi-secret-codes

Conversation

@swoboda1337
Copy link
Copy Markdown
Member

Summary

Test plan

  • Verify secrets are redacted in dashboard log output
  • Verify secrets are redacted in dashboard config validation output (streamer mode)

🤖 Generated with Claude Code

Update secret state handling from blink codes (5/6) to the correct
conceal/reveal codes (8/28) to match esphome/esphome#15521.
Comment thread src/util/console-color.ts
Comment on lines +94 to +97
case 8:
this.state.secret = true;
break;
case 6:
case 28:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably need to handle old devices as well

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, build is broken too

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix for the build #894

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to be backwards compatible

Copy link
Copy Markdown
Member Author

@swoboda1337 swoboda1337 Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I merged the build fix, should be good

Devices running older firmware will still send blink codes (5/6),
so keep handling those alongside the new conceal/reveal codes (8/28).
@jesserockz jesserockz merged commit b813799 into esphome:main Apr 8, 2026
3 checks passed
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.

3 participants