Add mute switch functionality

This commit is contained in:
Omar Amin authored and GitHub committed 2026-01-21 00:04:40 +02:00
1 parent d5f902ae77
commit 1b7c8ca639
1 file changed
+4 -1
+4 -1
View File
@@ -13,7 +13,7 @@ if TYPE_CHECKING:
from pyopen_wakeword import OpenWakeWord
from .entity import ESPHomeEntity, MediaPlayerEntity
from .entity import ESPHomeEntity, MediaPlayerEntity, ThinkingSoundEntity
from .entity import ESPHomeEntity, MediaPlayerEntity, MuteSwitchEntity, ThinkingSoundEntity
from .mpv_player import MpvMediaPlayer
from .satellite import VoiceSatelliteProtocol
@@ -76,10 +76,13 @@ class ServerState:
media_player_entity: "Optional[MediaPlayerEntity]" = None
satellite: "Optional[VoiceSatelliteProtocol]" = None
mute_switch_entity: "Optional[MuteSwitchEntity]" = None
thinking_sound_entity: "Optional[ThinkingSoundEntity]" = None
wake_words_changed: bool = False
refractory_seconds: float = 2.0
thinking_sound_enabled: bool = False
muted: bool = False
connected: bool = False
def save_preferences(self) -> None:
"""Save preferences as JSON."""