Custum Markdown Card - Date and Time Format

Hello, I’m using “useful-markdown-card” from @thomasloven and I would like to display a date, but I want it in other format. Like “12/04/2019 15:00” I tried to format in the template, but i keep getting undefined.

          - type: custom:useful-markdown-card
            content: Last Update [[ sensor.leaf1diog_charge.attributes.updated_on ]]

Is this possible?

Thank you

Not at this point, but it’s something I’m looking at adding.

Thank you @thomasloven

Best regards

Of course it is possible. Just create a sensor like this and use it on the card:

>   - platform: template
>     sensors:
>       date_long:
>         friendly_name: 'Dia e Hora'
>         entity_id: sensor.date
>         value_template: >
>           {% set months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"] %}
>           {% set days = ["Segunda-Feira", "Terça-Feira", "Quarta-Feira", "Quinta-Feira", "Sexta-Feira", "Sábado", "Domingo"]  %}
>           {{ days[now().weekday()] }}, {{ now().day }} de {{ months[now().month-1] }} de {{ now().year }}
2 Likes

I’ll try that! Thank you