Add Forward Slash to Input

I’m trying to take an !input number for time_pattern and add a forward slash to it for a trigger. For instance, if the !input is set to 10, I want to make a time_pattern of “/10” instead.

I’ve been playing with various syntax for longer than I care to admit and can’t seem to figure it out. Is this possible? I couldn’t seem to get the variable to work, but the “!input detection_frequency” seems to work. Just can’t get it to add a / in front of it. Thanks in advance!

  input:
    detection_frequency:
      name: Detection Frequency
      description: The detection algorithm will run in every defined seconds
      default: 5
      selector:
        number:
          min: 1.0
          max: 60.0
          mode: box
          unit_of_measurement: seconds
          step: 1.0
variables:
  DETECTION_FREQUENCY_VAR: !input detection_frequency
mode: single
max_exceeded: silent
triggers:
- trigger: time_pattern
  seconds: "/"!input detection_frequency

Hello thegame3202,

You need to template the entire field there, so the selector has to be a text selector ( or maybe a select selector ) and the user has to enter /10 or whatever.

At least that is my experience.

1 Like

Hmm, explains why it wasn’t working haha. Thank you!!

1 Like

If one of the suggestions listed solves your problem, please consider clicking the solution button to close the thread. (even your own…)