Delete linux_voice_assistant/wakeword_indicator.py

This commit is contained in:
imonlinux
2025-09-10 12:40:19 -07:00
committed by GitHub
parent 9ccd186ae4
commit 364aef1a74
@@ -1,20 +0,0 @@
"""Wakeword Engine indicator helper.
Provides a simple function to update the text sensor state via APIServer.
"""
from .api_server import APIServer
SENSOR_OBJECT_ID = "wakeword_engine"
def set_wakeword_engine(server: APIServer, engine_name: str) -> None:
"""Publish the current wakeword engine name to Home Assistant.
Call this after the engine is selected and whenever it changes.
"""
msg = server.publish_text_sensor(SENSOR_OBJECT_ID, engine_name)
if msg is not None:
# Enqueue/send happens in the server run loop; callers should hand this to the transport.
# For convenience, APIServer.handle_message() returns messages to write downstream.
# Here we directly push by using APIServer._writelines if available.
if getattr(server, "_writelines", None) is not None:
server._writelines([msg]) # type: ignore[attr-defined]