dbrunt
(Daniel)
February 2, 2022, 10:17am
1
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;
dbrunt
(Daniel)
February 2, 2022, 10:37am
2
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’)
tom_l
February 2, 2022, 10:42am
3
dbrunt
(Daniel)
February 2, 2022, 10:47am
4
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.