The device it controls has a piezo buzzer and a momentary switch. The beeping alarm triggers just fine when the switch is toggled in the HASS devices dashboard. When the physical momentary button is pushed the HASS devices dashboard reflects this by putting a line through the note and changing “detected” to “clear”.
What I am wanting to do is to link the two together i.e. when the physical button is pressed, if the buzzer is beeping, then Siren toggle on the dashboard changes to off and the sound stops.
You need to give your button instructions on what to do by adding an automation to your gpio binary sensor, such as “on-press” or “on-release”…
You could use switch.toggle instead if you wanted to be able to trigger the siren by pressing the button.
Since the button itself is not detecting sound I would leave its device class as default, not sound. But it won’t hurt anything to have the device class that way, it will just make your state appear as “detected/clear” in the frontend instead of “on/off”.
If you don’t actually need to see the button’s entity in Home Assistant, you can also add “internal: true”.