What can I do/not do in customize.yaml with templates?

I have templated an additional attribute for my covers in customize.yaml. I do not know if this is custom_ui at work or native HA. This code is working but I would like to return an integer rather than a string…

cover.kitchen_blind_2:
  device_class: cover
  templates:
    open_position: >
     return entities['input_number.kitchen_blind_2'].state;

image

Nevermind! It has not created a real attribute that I can use with state_attr().
It must be custom_ui trickery…

Template editor:
{{state_attr('cover.kitchen_blind_1','open_position')}} Result: None (not ‘49.0’)

None of the customize variable options accept templates. See https://www.home-assistant.io/docs/configuration/customizing-devices/#configuration-variables

Thank you for the clarification! So it is custom_ui rendering what I have now. I appreciate the feedback…

Since what I have concocted is unusable I will resort to hard-coding the input_number's where needed.