How to setup ESPHome to control my Bluetooth controlled (Octocontrol) bed

I only have one connected ‘[0]’ only. Based on the information you’ve shared I’d expect you also to have 0 or possibly 1

I’m able to control my bed, but it’s going wild when I press a button. It’s not stopping controlling the bed and with the ‘delay’ it’s shocking (start/stop/start/stop).

I have to unplug the ESP32 to get the bed under control. I thought I could just ‘hold’ the button to control it and when I let go it stops. Anyone any idea?

The/my original remote is sending commands multiple times per second. That’s why I send it every 300ms for 30 seconds.
I do recognize that when I first send ‘up’ and within the 30 seconds ‘down’ it will send up/down/up/down commands, which is not good… I still need to work on preventing that…
Is that what happened on your side?

I think that may be part of the issue indeed. Trying to thinker further on how to make this smooth.

Is there a way within ESPhome, like with the actual physical remote, to ‘on_hold’ the button and it stops when you release?

If you attach a button to ESPHome you can use Binary Sensor Component — ESPHome
I do not see how to do this with a button in home assistant