Timer to turn off lights in x amount of mins button

I am still learning about home assistant a bit and was wondering if there is a way where I can add a button to my dashboard that would count down from, 5 minutes for example, and after those 5 mins it will run an automation, such as to turn off a certain light.

Thanks

Step 1: Set up the timer integration. Have the button on your dashboard call an action to start a timer with a 5 minute duration.

Step 2: Create an automation with the timer.finished event as the trigger to turn off your light

can you share a step by step guide on how to create this timer? i am struggling a little bit

Which part are you stuck on? The link I posted is pretty self explanatory

I have created my timer and it counts down and works well. I am just struggling tying it into an automation such as turn off a certain light or run a series of automations

Your trigger should look something like this (untested, but stolen from this post)

trigger:
  - platform: event
    event_type: timer.finished
    event_data:
      entity_id: timer.yourtimer
condition: whatever
action: whatever