Update models.py

Uploaded wrong version of the file.
This commit is contained in:
imonlinux
2025-11-18 11:51:04 -08:00
committed by GitHub
parent 2fdef7d6ce
commit 2808877895
+3 -2
View File
@@ -84,14 +84,15 @@ class ServerState:
timer_finished_sound: str timer_finished_sound: str
preferences_path: Path preferences_path: Path
download_dir: Path download_dir: Path
preferences: Preferences # <-- MOVED UP preferences: Preferences
# --- Fields WITH default values --- # --- Fields WITH default values ---
satellite: "Optional[VoiceSatelliteProtocol]" = None satellite: "Optional[VoiceSatelliteProtocol]" = None
wake_words_changed: bool = False wake_words_changed: bool = False
refractory_seconds: float = 2.0 refractory_seconds: float = 2.0
mic_muted: bool = False mic_muted: bool = False
shutdown: bool = False
def save_preferences(self) -> None: def save_preferences(self) -> None:
"""Save preferences as JSON.""" """Save preferences as JSON."""
_LOGGER.debug("Saving preferences: %s", self.preferences_path) _LOGGER.debug("Saving preferences: %s", self.preferences_path)