-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formatting last_changed #2
Comments
This may be possible in the future. I have suggested that card-tools implement the ability for templates to reference functions that could execute arbitrary code. No commitments on when/if that will be possible, but it is being considered. |
I solve it with this: card:
entities:
- entity: switch.myswitch
secondary_info: '${ new Date(states[''switch.myswitch''].last_updated).toLocaleString(''es-ES'') }'
type: 'custom:secondaryinfo-entity-row'
show_header_toggle: false
title: ⚙️ My Title
type: 'custom:hui-entities-card'
type: 'custom:config-template-card' |
@GoNzCiD it dint work for me ... need some additional JS ?
|
I don't know if any other js are needed, I used all these for all the lovelace view I had at this moment:
|
bonjour, j'ai donc fait ce Template afin d'avoir un affichage qui correspond à mes attentes après un redémarrage de HASS. type: grid
c'esyt long pour un secondary_info, mais ça fonctionne. |
It would be great to have the ability to format the secondary_info attributes (cutting of parts of the string etc.).
The text was updated successfully, but these errors were encountered: