Cant work out how to trigger a flow based on a switch change

Hi,
I’m sure I’m doing something stupid.

I have an immersion controller that’s connected to Tuya. I can set times to switch it on & off fine.

It has a single button on it which changes its state to on if off and visa versa.

I want to set a sequence that starts when the button is pressed to turn it off after a set amount of time.

I’m guessing I use either Events:State or Trigger:state, but cant get either to make anything happen.

Any ideas?

Cheers
Paul

Hi there… Please share the yaml. It would be helpful

Its weird, but the immersion controller doesn’t seem to report its status back to the Tuya app or home assistant.
No events are triggered when I push the button.

I have added a Sonoff ZigBee switch and now use that to trigger the boost.

It has the added benefit of being able to be placed anywhere, and also supports 2 modes, single click and double click, each triggering a different length of boost.