Skip to content

Commit

Permalink
fixes from local qa
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejgray committed Jun 5, 2024
1 parent eccc57b commit d7594da
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ class DeviceControlCenterSkill(NeonSkill):
_pending_audio_restart = False
_dialog_to_speak = ""
user_config_path = expanduser("~/.config/neon/neon.yaml")

def initialize(self):
self.bus.on("mycroft.ready", self._speak_restart_dialog())

@classproperty
def runtime_requirements(self):
Expand Down Expand Up @@ -340,6 +343,14 @@ def handle_change_ww(self, message):
def stop(self):
pass

def _speak_restart_dialog(self, message: Message):
"""Handle speaking a confirmation dialog after a restart."""
if self._dialog_to_speak and self._pending_audio_restart:
self.log.info(f"Neon has restarted, speaking dialog {self._dialog_to_speak}")
self.speak_dialog(self._dialog_to_speak)
self._dialog_to_speak = None
self._pending_audio_restart = False

def _enable_wake_word(self, ww: str, message: Message) -> bool:
"""
Enable the requested wake word and return True on success
Expand Down

0 comments on commit d7594da

Please sign in to comment.