Switch button lovelace

Hello everyone,

Maybe l’m looking at the wrong spot, but i’m trying to create an toggle button on the overview witch changes the Tado thermostat state to home or away.
I try to use the climate.set_present_mode. But apparantly a button toggles only between on and off.

I’ve also tried the python set_state script, but Tado won’t recognize the input and changes it back after a few seconds…

How can I change the behavior of a button so it wil toggle between custom states?