Skip to content

Add 'Beep on arrival' toggle for ratgdo32-disco boards#560

Open
mav2287 wants to merge 3 commits intoratgdo:mainfrom
mav2287:feature/beep-on-arrival-toggle
Open

Add 'Beep on arrival' toggle for ratgdo32-disco boards#560
mav2287 wants to merge 3 commits intoratgdo:mainfrom
mav2287:feature/beep-on-arrival-toggle

Conversation

@mav2287
Copy link

@mav2287 mav2287 commented Mar 6, 2026

Summary

  • The ratgdo32-disco buzzer beeps on every vehicle arrival with no way to disable it independently of the closing delay safety beep. This adds a new "Beep on arrival" switch that controls whether the arrival beep plays, while leaving the closing delay beep unaffected.
  • Defaults to ON for backwards compatibility — existing users see no behavior change unless they explicitly toggle it off.
  • Setting persists across reboots via ESPHome preferences.
  • Shows in ESPHome web UI and Home Assistant as a config switch (alongside LED, LASER, etc.).

Changes

  • ratgdo.h / ratgdo.cpp — Add beep_on_arrival observable, getter/setter, and subscribe method (inside RATGDO_USE_VEHICLE_SENSORS guard)
  • switch/ratgdo_switch.h / ratgdo_switch.cpp / __init__.py — Add RATGDO_BEEP_ON_ARRIVAL switch type with preference persistence
  • output/ratgdo_output.cpp — Gate the vehicle arrival beep on get_beep_on_arrival()
  • All 6 v32disco YAML files (root + static/) — Add the new switch entry

Test plan

  • Beep on arrival defaults to ON (backwards compatible)
  • Toggling OFF prevents beep when vehicle arrives
  • Closing delay beep still works regardless of this setting
  • Setting persists across reboots
  • Shows in ESPHome web UI and Home Assistant as a config switch

🤖 Generated with Claude Code

James and others added 2 commits March 6, 2026 10:03
@PaulWieland
Copy link
Contributor

Build failure has to be fixed before this can be merged.

Wrap RATGDO_BEEP_ON_ARRIVAL switch cases with #ifdef RATGDO_USE_VEHICLE_SENSORS
guards to match the conditional compilation of set_beep_on_arrival(),
get_beep_on_arrival(), and subscribe_beep_on_arrival() in ratgdo.h/ratgdo.cpp.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mav2287
Copy link
Author

mav2287 commented Mar 8, 2026

@PaulWieland should be good now, take a look and let me know.

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