There is Constants or something equivalent like that in esphome?


I wonder if There is constants or something equivalent like that in esphome?

Thank you

Like a template sensor?

  - platform: template
    name: "Constant Value"
    lambda: |-
        return 42; # your constant value here
1 Like
name: "Life the Universe and Everything"

What problem are you trying to solve?

If it’s about reducing duplication in your config, then look at Configuration Types β€” ESPHome.


Thank you.
Yes this is what i exactly need.

I want to have a singgel place for configuration values so i can easily change between test and working configuration.

1 Like

That sentence would have fit well in your first post like described in the post β€œHow to ask a good question”:

:eight: Describe the goal, not the problem

1 Like