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