myle
(StePhan McKillen (Other kiwi Here))
March 21, 2018, 12:52am
1
i have
customize_glob:
switch.cupboard_heater:
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.
myle
(StePhan McKillen (Other kiwi Here))
March 21, 2018, 1:55am
3
Dont think that the problem
if i do this
extra_data_template: >
testing
I see testing
so I think its something to do with the if else thing
myle
(StePhan McKillen (Other kiwi Here))
March 21, 2018, 3:54am
4
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.