audioNotification Capability / Missing Argument Question

The documentation for the audioNotification capability provides for an optional volumelevel argument on all the available commands. The volumelevel argument is properly exposed in the device presentation on most of the commands, but not on playTrack or playText.

Screenshot 2023-02-09 at 08-02-22 Sonos Family

Yet, curiously, the option appears to be available to webCoRE:

I'm currently working on a driver and am seeing issues related to the inconsistency. I expect I can work around it, but am curious why it was done this way.

If you have the capability "Music Player" as well as "Audio Notification", apparently the Music Player play track takes precedence (no volume).

You can rectify this by adding a command "playTrack" in the metadata that has the trackURi and the Volume as the inputs.

As far as method, a
def playTrack(uri, volume = null) will of course work with either form of the command.

2 Likes

To me it feels like it should be the other way around, but at least that explains it.

I had included a custom command already as a workaround; just was curious why it was necessary. Thanks.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.