Put parameter with Keyboard

Hi everybody,

I’ve got adjustables countdowns in my interface :

Capture

When it finish, I’ve got a notification with the message : “Minuteur 1 is finished !”

As I wish use it to cooking and as I’ve got few countdowns, I wanna put a variable name, and write it to keybord in place of “Minuteur 1”.
Does it possible ?

I hope to be clear…

Thank you !!

I’m not aware of a textbox where you can write down a text and use it further.

But if you have a certain amount of recurring times, you could pre-define it with an input_select?

https://home-assistant.io/components/input_select/

Huum… I should think about this solution…!

Thank you !

Can you share code for this countdown? Thanks.

Of course !!

For sensor :

  - platform: template
    sensors:
      minuteur_1_time:
        friendly_name: 'Minuteur_1 : '
        value_template: '{{"%0.02d" | format(states("input_slider.minuteur_reglable_1") | int) }} minutes'

  - platform: template
    sensors:
      minuteur_1_end:
        friendly_name: 'Finira à : '
        value_template: '{{ ((now().strftime("%s") | int + (states("input_slider.minuteur_reglable_1") | int) * 60) | timestamp_custom("%H:%M")) }}'

For input_slider :

  minuteur_reglable_2:
    name: Réglable_2
    icon: mdi:timer
    initial: 0
    min: 0
    max: 59
    step: 1

Input_boolean :

  minuteur_reglable_2:
    name: Minuteur_2
    initial: off 

Automation :

- alias: 'Minuteur Réglable 1'
  initial_state: 'on'
  hide_entity: False
  trigger:
    - platform: state
      entity_id: input_boolean.minuteur_reglable_1
      to: 'on'
      from: 'off'
  action:
    - delay: '00:{{ "%0.02d" | format(states("input_slider.minuteur_reglable_1") | int) }}:00'
    - service: switch.turn_on
    - service: input_boolean.turn_off
      entity_id: input_boolean.minuteur_reglable_1
    - service: notify.pushbullet
      data:
          message: "Le minuteur 1 est terminé !!"
          title: "Jarvis"

Thanks again. :slight_smile: Is it possible to make this work with hours not just minutes?

Yes, you just need to add an “Input Slider” for hours and to adapt sensor part !

1 Like