Custom UI: What am i missing

i have

     custom_ui_state_card: state-card-custom-ui
     extra_data_template: >
        if (states.automation.cupboard_timer_onoff == "on") return "on at 6:30pm"; else return null

The extra data does not show what did I do wrong

I haven’t used this exact custom ui component myself. But I’ve found with a lot of the custom-ui stuff that clearing the cache is required to get it to work. Give that a go and see what happens.

This is assuming your code works and you’ve included the file correctly under the frontend component.

Dont think that the problem
if i do this

extra_data_template: >

I see testing

so I think its something to do with the if else thing

work it out

 if (entities['automation.cupboard_timer_onoff'].state === 'on') return 'on at 6:30pm'; else return null;

it work when you read the right manual

this is what happens when the automation off
then when automation on

why because the automation only come on when the washing is completed.