From 6ec1030541df9a0a29c4dd5125a814a852c79151 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Mon, 29 Jan 2024 15:34:11 -0800 Subject: [PATCH] Update to default escalating volume True for alarms to be audible (#134) Co-authored-by: Daniel McKnight --- __init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index 2b3c30b..b74a34f 100644 --- a/__init__.py +++ b/__init__.py @@ -144,7 +144,7 @@ def escalate_volume(self) -> bool: """ If true, increase volume while alert expiration is playing """ - return self.preference_skill().get("escalate_volume", False) + return self.preference_skill().get("escalate_volume", True) @property def quiet_hours(self) -> bool: @@ -170,6 +170,8 @@ def alert_timeout_seconds(self) -> int: """ Return the number of seconds to repeat an alert before marking it missed """ + # TODO: This should be per-type; a user may want an alarm to go off for + # longer than a timer timeout_minutes = self.preference_skill().get('timeout_min') or 1 if not isinstance(timeout_minutes, int): LOG.error(f'Invalid `timeout_min` in settings. ' @@ -1055,7 +1057,7 @@ def _play_notify_expired(self, alert: Alert): # TODO: refactor to `self.play_audio` LOG.debug(f"Playing file: {to_play}") play_audio(to_play).wait(60) - time.sleep(1) + time.sleep(1) # TODO: Skip this and play continuously? if self.escalate_volume: self.bus.emit(Message("mycroft.volume.increase"))