Skip to content

feat(crow_alarm_panel): add raw-frame logging toggle switch - #9

Merged
dan-s-github merged 1 commit into
mainfrom
dan-dev
Jul 25, 2026
Merged

feat(crow_alarm_panel): add raw-frame logging toggle switch#9
dan-s-github merged 1 commit into
mainfrom
dan-dev

Conversation

@dan-s-github

Copy link
Copy Markdown
Owner

Summary

  • Adds a switch: type: log_raw_frames platform that forces the raw-frame log line (Received raw frame [...], normally VERBOSE-only) to also log at INFO, so raw bus traffic can be inspected at runtime without recompiling with a higher logger level.
  • Pure software toggle — no bus traffic, always starts off (no restore across reboots).
  • Defaults to the mdi:text-box-search-outline icon (overridable via icon:).

Test plan

  • uv run esphome config crow_alarm_panel_test.yaml validates
  • uv run esphome compile crow_alarm_panel_test.yaml builds successfully

Generated with Claude Code

Raw bus frames previously only logged at VERBOSE. Adds a
type: log_raw_frames switch that forces the raw-frame log line to
INFO while enabled, so raw traffic can be inspected without
recompiling with a higher logger level. Defaults to the
mdi:text-box-search-outline icon.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an optional “debug” switch to the crow_alarm_panel integration that lets users elevate the existing raw-frame receive log line from VERBOSE to INFO at runtime, without rebuilding with a higher logger level.

Changes:

  • Introduces a new switch: type log_raw_frames (pure software toggle) that flips a flag on the parent component.
  • Updates the C++ loop raw-frame logging to emit at INFO when the toggle is enabled, otherwise keeps VERBOSE.
  • Documents and exercises the new switch in README.md and crow_alarm_panel_test.yaml.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crow_alarm_panel_test.yaml Adds the new log_raw_frames switch to the canonical fixture.
components/crow_alarm_panel/switch/crow_alarm_panel_switch.h Declares the new CrowAlarmPanelRawLogSwitch switch type.
components/crow_alarm_panel/switch/crow_alarm_panel_switch.cpp Implements the switch behavior by toggling the parent’s raw-frame logging flag.
components/crow_alarm_panel/switch/init.py Adds the new typed schema entry and wires codegen to set the parent pointer.
components/crow_alarm_panel/README.md Documents the new switch type, including behavior and default icon.
components/crow_alarm_panel/crow_alarm_panel.h Adds a setter and member flag for raw-frame logging at INFO.
components/crow_alarm_panel/crow_alarm_panel.cpp Switches the raw-frame log line between ESP_LOGI and ESP_LOGV based on the flag.

@dan-s-github
dan-s-github merged commit 0a49734 into main Jul 25, 2026
1 check 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.

2 participants