Mqtt trigger automation

Hey,

I’m completely new to this and a little lost, also I’m tech savy but I’m not good at scripting or programming.
I set up HA on my server and have all my switches, lights (lightify), players detected and configured.
Now im trying to toggle a switch (rf outlet) with a dash button, therefore Ill set up mqtt-dasher which seems to work fine. But I’m lost in automating this thing.

The das button gives me: [hbmqtt.broker] broadcasting {‘session’: Session(clientId=mqttjs_8f5f3e7e, state=connected), ‘topic’: ‘dash1’, ‘data’: bytearray(b’active’)}

As far as I understand it I need an automation which toggels the switch while recieving a mqtt status… I did hours of try and error, but I think I don’t understand the whole thing. Last I came up with is something like this:

automation:
trigger:
platform: mqtt
topic: “dash1”
payload: “active”
retain: “true”
action:
service: switch.toggle
entity_id: switch.Desk

Can someone point me in the right direction? I’m sorry if this kind of noobish but I’ll try to learn.