Skip to content

Commit

Permalink
fix: Added ListAlarms
Browse files Browse the repository at this point in the history
fixed #145
  • Loading branch information
svrooij committed Jun 30, 2021
1 parent 4320509 commit 762f2ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sonos-to-mqtt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ export class SonosToMqtt {
return this.sonosManager.PlayTTS(payload);
case 'pauseall':
return Promise.all(this.sonosManager.Devices.map(d => d.Pause()));
case 'listalarm':

case 'listalarm': // This typ-o is still there for backward compatibility
case 'listalarms':
const alarms = await this.sonosManager.Devices[0].AlarmClockService.ListAndParseAlarms()
this.mqtt.publish('alarms', alarms);
break;
Expand Down

0 comments on commit 762f2ae

Please sign in to comment.