Concatenation of a numerical value with a character

Hello, everyone,

please excuse my bad english.

Unfortunately, I’m a total beginner in esphome and have a problem that I can’t get any further.

I am trying to transfer a value from HomeAssistant to a Wemos D1 mini using a number template and to control a slow_pwm there with the value.

In espHome I created the following:

number:

  • platform: template
    name: “Template number”
    optimistic: true
    min_value: 0
    max_value: 100
    steps: 1
    id: slow_Number
    on_value:
    then:
    output.set_level:
    ID: my_slow_pwm
    level: !lambda “return id(slow_Number).state;”

In the last line, a % sign would have to be added after the value "returnid(slow_Number).state for this to work.
Unfortunately I just can’t do it.
My question would be how do I concatenate the number value with the % sign?
I hope you understand what I mean and can help me.

Thank you and best regards
dieter

if this an input_number, you can only have numbers… use input_text if you want to add characters…

Hi there,

It is clear to me that I can only transfer numerical values via the template, but it must be possible to add a character to the value in the ESPHome device.

Use unit_of_measurement: "%"