I use input_text sensor for main color of the card where my night clock is shown In order to minimize brightness i use oled tablet and very dark shaded of grey.
For this i created input_text sensor with value “rgb(20,20,20)”. If i want to change color i have manually enter all three numbers each time. Since they are always the same - as said, i only use shades of grey, i wonder, is it possible to “assemble” this sensor into rgb value inside template? I mean somethng like this:
i set “input_number.color” with a value 20 - this one i’ll change manually when needed.
Of course above doesn’t work, it’s just for explaining what i’d like to achieve. Is that even possible without using service? Above combination however works if i set a variable (replace “set input_text.main_color” with, say “some_variable”) , but not if i want to change an entity.
Or is there another way to define grey values easily inside a card?
Hm… ok, but how would i run this service? I would like template sensor to be immediately updated when i change that one number. If i’m not thinking wrong using service would require running service each time i change the number, correct?
I succesfully ended up with service and automation, works like a charm.
I just though at the beginning that it’s possible to alter contents of certain entity with some command in template sensor, similar like i define variables, but i can’t find any way except service call.