So i have a button like below if i press and hold it it will resend switch.turnoff even if the state is already off, is there any way to get it to resend on when its on and off when its off??
so what i’m looking for is: change “service: switch.turn_off” to “service: switch.turn_on” depending on the state of the switch
i cant figure out of its even possible, anyone have any ideas?
type: button tap_action: action: toggle hold_action: action: call-service service: switch.turn_off service_data: entity_id: switch.window show_icon: true show_name: true show_state: false entity: switch.window