Jinja Code for Customize section

Now that there are changes to the way customize is being used in 0.39, I thought this might be a good time to share some useful code I have been using to auto generate the customize section using Jinja and the template icon in HA.

Just go to the developer tool in the picture and paste in the code from my repo to generate an old school customize file for all your sensors, input_booleans, etc… Be sure to change the states.sensor to whatever you want to generate.

You can find the code in my repo here:
https://github.com/CCOSTAN/Home-AssistantConfig/blob/master/shell_scripts/Jinja%20Code.py#L7-L21

Credit goes out to @dale3h who I am sure helped seed this code for me. (He is the original Jinja Ninja after all).

4 Likes