Skip to content

Commit

Permalink
fix play media for timer (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
emphasize authored Jan 10, 2024
1 parent 01bf606 commit 5c6c92f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,10 @@ def _play_notify_expired(self, alert: Alert):
timeout = self.alert_timeout_seconds
max_volume = self.play_volume
escalate = self.settings.get("escalate_volume")
if escalate and not alert.alert_type == AlertType.TIMER:
if alert.alert_type == AlertType.TIMER:
escalate = False

if escalate:
volume = 0.1
# half of the time play on full loudness, increments of 10% vol
steps = int(timeout / 2 / ((max_volume - volume) / 0.1))
Expand Down

0 comments on commit 5c6c92f

Please sign in to comment.