Skip to content

Conversation

jianyu-li
Copy link

  • Add MuteSwitchEntity class that behaves like ESPHome Voice PE mute switch
  • Switch maintains its own state and triggers voice_assistant.stop/start_continuous actions
  • When muted: stops audio streaming, TTS player, and wake word detection
  • When unmuted: resumes normal voice assistant operation
  • Add SwitchCommandRequest message routing to entity handling
  • Add muted field to ServerState dataclass
  • Modify audio processing to respect mute state
  • Backward compatible: only adds new mute switch entity

Tested and working on Raspberry Pi.

jianyu-li and others added 2 commits September 8, 2025 11:02
- Add MuteSwitchEntity class that behaves like ESPHome Voice PE mute switch
- Switch maintains its own state and triggers voice_assistant.stop/start_continuous actions
- When muted: stops audio streaming, TTS player, and wake word detection
- When unmuted: resumes normal voice assistant operation
- Add SwitchCommandRequest message routing to entity handling
- Add muted field to ServerState dataclass
- Modify audio processing to respect mute state
- Fully backward compatible - only adds new mute switch entity

Tested and working perfectly on Raspberry Pi with Home Assistant integration.
@zolakt
Copy link

zolakt commented Sep 22, 2025

Could you share some instructions how could this be hooked up to a physical switch connected to the pi?

@jianyu-li
Copy link
Author

This is a software-based mute switch only that appears in home assistant. I don't have a physical switch to test with

@zolakt
Copy link

zolakt commented Sep 22, 2025

Yeah I know it's a software switch. It would be cool to hook this up to a physical button as well

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