Please, for the sake of hundreds of lines of code, there has to be a way!!
I have a couple Picture Element cards that I use on a visual display to show various thermostats throughout my house, but I have a custom typeface for the temperature values. Specifically, I have 99 png files, each being a number, with a portion of the card the card setup like this
- type: image
entity: sensor.pngfmt_lvngrm_temp_act
state_image:
01: /local/images/thermostat/numbers/01.png
02: /local/images/thermostat/numbers/02.png
03: /local/images/thermostat/numbers/03.png
....
97: /local/images/thermostat/numbers/97.png
98: /local/images/thermostat/numbers/98.png
99: /local/images/thermostat/numbers/99.png
(I deleted the rows for #'s 4-96 for this example, but they’re in my layout).
Is there a way I can create a script or something on the backend that will essentially represent these 99 rows, and in my layout, instead of having these 99 rows, I can just reference that? I’m thinking of creating a master thermostat layout that includes 6 thermostats (both integrations and generic thermostats), and with two temperature values for each thermostat, I’d much rather not have 12 instances of the 99 rows.
Thanks!