Ludvig,
Based on that link my guess is that you are seeing the alarm indicator as the binary sensor. There is probably another way to set the mode. Have you checked to see if there are any other controls (that might be hidden) or configuration options in the device info page?
-David
The implication from the link you posted is that z2m cannot set the alarm state, which is why it is configured as a binary sensor rather than a switch. What is it you’re wanting to achieve by converting it to a switch? If it’s to then turn it on/off from HA, that doesn’t (currently) look possible with this device and z2m.
You need to create an mqtt switch that publishes to this topic:
Warning (composite)
Can be set by publishing to zigbee2mqtt/FRIENDLY_NAME/set with payload {"warning": {"mode": VALUE, "level": VALUE, "strobe_level": VALUE, "strobe": VALUE, "strobe_duty_cycle": VALUE, "duration": VALUE}}
mode (enum): Mode of the warning (sound effect) allowed values: stop, burglar, fire, emergency, police_panic, fire_panic, emergency_panic
Thank you for you support, I’m a quite noob in Home Assistant.
Right now my config looks like below, and I got several av warning,
Could you write down the config? I see that I’m missing the actual entity: binary_sensor.siren_alarm