The Dome Siren and likely other Z-Wave siren / alert devices support the Indicator command class for a chime, which is separate from the main Siren that is modeled as a binary switch.
The ideal implementation of this IMO is for the device to be exposed through the notify platform in HA so that a script or automation can trigger a chime. Unlike the binary switch for the siren, the chime does not provide feedback and does not need to be turned off again.
you could also get it to play any audio file, so you can download a chime sound and have it play that if you like. Personally I like the house to talk lol.
It is supported by OpenZwave. At least in the config files. I have started to look into it but it may be far above my skill set. if anyone can give me a basic OZW call I can break it down and figure it out.
The siren shows up as a binary switch. Turning it on/off works as expected for the primary siren. The device also supports a secondary chime which can’t be accessed through HA.
I am not using Hassio, should be able to test whatever. Yeah, as I understand it the indicator class is a one time message - turning it “off” would be meaningless.
Sorry, I should have been clearer about what I meant -
The class itself may support the concepts of on (00) and off (FF) but that isn’t the way the dome siren uses it - it accepts different bytes 01-0A for the ten different secondary chime sounds it can make. Unlike with the primary siren, there’s no turning the sound ‘off’ after requesting it - the sound just happens once and then is over.
OK, I changed your file slightly before implementing given the Dome docs I referenced above:
INDICATOR_ON = 0x01
INDICATOR_OFF = 0x0A
It probably doesn’t really make sense for ‘on’ and ‘off’ to trigger two different sounds but I figured this is at least worth testing. The switch.siren_indicator entity shows up fine in HA. Got the below in the HA log when I tried to turn it on. (I also tried it with your original values for INDICATOR_ON/_OFF and got the same error)
2018-04-05 22:39:09 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall switch.turn_on: entity_id=[‘switch.siren_indicator’]>
Traceback (most recent call last):
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/core.py”, line 1006, in _event_to_service_call
await service_handler.func(service_call)
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/switch/init.py”, line 109, in async_handle_switch_service
await switch.async_turn_on()
File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/switch/zwave.py”, line 92, in turn_on
self.values.primary.value_id = INDICATOR_ON
AttributeError: can’t set attribute