I am using a couple of ESP8266 boards with Home Assistant for sensors and alarms. All is working fine.
I have just added a 3.3v piezo buzzer to pin 8 of one of my boards to use as an alarm pending warning. The buzzer works fine if set up as a continuous sounder. I would like to set it up as an intermittent warning buzzer. The following code works fine:
switches: - pin: 8 name: 'Warning buzzer' momentary: 500 pause: 500 repeat: 15
However, I would like a continuous buzzer that stays on until the switch is switched off. I have tried:
switches: - pin: 8 name: 'Warning buzzer' momentary: 500 pause: 500 repeat: -1
As per the documentation. With this setup, the buzzer sounds only once and then stops. The switch in HA acts as a momentary switch, and turns off about a second after turning on.
Any idea what I am doing wrong?