Using Zigbee Button to turn on a device

I am very new to HA

I have a coffee machine which is integrated into HA and can be switched on and off via HA.

I want to use a Zigbee button (I have the sonoff one) which I have added to HA via ZHA.

I want to use the button to toggle the machine on & off.

How do I do this exactly?

You could create an automation. And choose Device as trigger type, choose the remote as selected device and choose the right action. Something like “Turn on button pressed” and in action section you device a toggle of a sensor or switch for your coffee machine.

did you look in the blueprints for something ??

know the OLDWAY

first u need to see the TRIGGER

so i would go into the events and watch for the Event to happen
as its a zha_event set it to listen to that.

know the we see the event when I press the button

so

- alias: 'Turn Off water Alarm'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: zha_event
    data:
      device_id:  "1222011164fad43b63125b103bb72161"
      command: "single"
  action:
    service: light.toggle
    entity_id: light.yourlightyouwantto toggle

Thank you Sir!

This has worked for me though I have a sonoff button but the principal is the same