zwave-js / certification-backlog

Issues and discussions related to Z-Wave certification of HA + Z-Wave JS
1 stars 0 forks source link

Z-Wave JS: Certification requirements for Sound Switch CC not fulfilled #16

Closed marcelveldt closed 1 week ago

marcelveldt commented 1 year ago

The end user MUST be able to play the default tone, play a selected tone or stop playing a tone.

The UI for siren control doesn't seem to allow selecting a specific tone, but it shows a weird dropdown with some attributes: grafik

Diagnostics information

zwave_js-f0926e113c178046d0d249fcdc42964a-Node 65-69bfeb31c9b5eca03be46337ae416f51.json.txt

marcelveldt commented 1 year ago

I believe I once wrote an architecture proposal for the siren platform, based on this Soundswitch CC and only the on/off feature has been implemented so far. Imo we should extend the siren platform as these feature are not unique to Z-Wave but also exist for zigbee/wifi sirens/chimes.

AlCalzone commented 6 months ago

To work around this in the short term, adding a simple dropdown to play a given tone like for the default tone should be enough to fulfill the certification requirements:

Please play tone 'Tone003'!

Image


Oddly enough, stopping the tone playing changes the controls to a toggle - seems unintended?

Image

marcelveldt commented 4 months ago

Fix the "Play Tone" so its always stateless (shows both start and stop) Add select entity to play a specific tone --> on select it will simply play the tone and revert the state of the select entity (or the state is simply always unknown)

MartinHjelmare commented 2 months ago

Would it be enough to change the default tone and turn on the siren to fullfil the "play a selected tone"?

AlCalzone commented 2 months ago

No, the specific play command is expected. Also it could be unexpected if playing a different tone once changes the default tone.

MartinHjelmare commented 2 months ago

I think this needs a selector from available tones, in the siren card in the frontend to enable passing the selected tone in the service call to turn_on. We shouldn't add more select entities for this. That would just be confusing since we have select entitites already for the default tones, and it would also not be in line with how a select entity should be used.

The available tones are part of the state attributes, so all data should exist already for the frontend to build this.

https://developers.home-assistant.io/docs/core/entity/siren#properties

marcelveldt commented 2 months ago

@MartinHjelmare so you are basically proposing that we can allow a "tone" argument to the "turn_on" action for a siren then ? Which basically means "turn on using sound X" ?

OK, me being blind; I see we already have that but just the frontend is missing the selector.

MartinHjelmare commented 2 months ago

Yes, exactly. It should just be a frontend improvement of the turn on feature for all sirens that support tones.

marcelveldt commented 1 month ago

siren.dump.zip

attached dump file to use in the mock server