In the documentation there is mention of friendly_name_template I am trying to use this to change the text if an attribute is set to 0 vs 1 in the same var definition. I have tried a lot of forms of the template but no joy so far.
If it does, it’s by happenstance that some commands are similar. I’ve never come across anything in the documentation that would suggest using jinga was acceptable.
Apologies, still rubbing sleep from my eyes. This is the var definition in the config file. I am writing all the nodes to manipulate the data flow in node-red. Spent a while simplifying the code and got rid of 2 function nodes by modifying other bits and decided using this bit would be helpful.
I found a reference that leads me to think I might need to call var.update to get the new friendly name to update. I’ll test that later today.
The help file says the template overides the friendly name.
Reading more carefully I see where It says I can update either the friendly name using var.set or force the template to evaluate with var.update. At the computer again vs the tablet so I’ll get to better test some things out. I believe I suffer from lack of reading the full docs. Will see soon.
Nope, doing a var.update does not work. It seems (maybe) there is an issue with using “state_attr”. Every example in the readme uses “states” never “state” or “state_attr”. I did get a state_attr to work for me in this section but it might not be exactly legit?