Variable timer automation from dashboard

Hi, i am trying to find a solution to a simple problem but can’t find the right solution.
I have a 3d printer powered via a smart plug. I want to be able to easily set a timer to switch of the 3d printer when i go to bed and it is still printing for an x amount of time without constantly having to go into my automations. I would like to be able to set the timer from my dashboard but just can’t find the right way to do that.
Any help would be appreciated.

Do you have the time remaining from the printer?
Post the entity from developer tools.
Also what is the name of the timer entity?

I only have the time remaining directly from the printer (app) as there is no integration for the Ankermake M5 into HA. That’s why i am looking for a way to manually set a timer on my dashboard to switch of the power based on the remaining printing time before i go to bed.

You can use fields for that.

So for example if you have a script with a field for time. Then when you add the script to the dashboard, for example in a tile card, whenever you run the script from the dashboard, there will be a popup asking for the value for the time field.

In case this is unclear without an example, here’s a script I use to disable an automation, set specific fan speed, then after customizable delay, enable the automation again:

alias: Wycisz oczyszczacz na wybrany czas
sequence:
  - action: automation.turn_off
    metadata: {}
    data:
      stop_actions: true
    target:
      entity_id:
        - automation.poziom_wiatraka_oczyszczanie_na_podstawie_pm_2_5
  - action: number.set_value
    data:
      value: "1"
    target:
      entity_id: number.mi_air_purifier_3_3h_favorite_level
  - delay: "{{ czas }}"
  - action: automation.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: automation.poziom_wiatraka_oczyszczanie_na_podstawie_pm_2_5
mode: single
icon: mdi:fan-off
fields:
  czas:
    selector:
      duration:
        enable_day: false
    name: Czas
    description: Czas, po którym oczyszczasz ma znowu działać normalnie
    required: true
    default:
      hours: 1
      minutes: 0
      seconds: 0
description: ""

Thx, i’ll have a look at that.

You running Octoprint? This is a blueprint for the Home Assistant extension inside Octoprint to add tools to your HA instance, including this feature and things like load filament, change filament, present the part, and a few buttons to add your own function.