Implement MQTT for Advanced LVA Controls
Includes various compatibility fixes, reversions, and clean-up from the previous development cycle to create a stable base for the MQTT implementation. This ensures the application starts reliably with the pinned aioesphomeapi version.
This commit is contained in:
@@ -64,6 +64,7 @@ class Preferences:
|
|||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class ServerState:
|
class ServerState:
|
||||||
|
# --- Fields WITHOUT default values ---
|
||||||
name: str
|
name: str
|
||||||
mac_address: str
|
mac_address: str
|
||||||
audio_queue: "Queue[Optional[bytes]]"
|
audio_queue: "Queue[Optional[bytes]]"
|
||||||
@@ -80,15 +81,16 @@ class ServerState:
|
|||||||
libtensorflowlite_c_path: Path
|
libtensorflowlite_c_path: Path
|
||||||
event_bus: EventBus
|
event_bus: EventBus
|
||||||
loop: asyncio.AbstractEventLoop
|
loop: asyncio.AbstractEventLoop
|
||||||
|
# MOVED openWakeWord fields here
|
||||||
# openWakeWord
|
|
||||||
oww_melspectrogram_path: Path
|
oww_melspectrogram_path: Path
|
||||||
oww_embedding_path: Path
|
oww_embedding_path: Path
|
||||||
|
|
||||||
|
# --- Fields WITH default values ---
|
||||||
media_player_entity: "Optional[MediaPlayerEntity]" = None
|
media_player_entity: "Optional[MediaPlayerEntity]" = None
|
||||||
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
|
||||||
|
|
||||||
def save_preferences(self) -> None:
|
def save_preferences(self) -> None:
|
||||||
"""Save preferences as JSON."""
|
"""Save preferences as JSON."""
|
||||||
|
|||||||
Reference in New Issue
Block a user