Component systemmonitor [solved]

Hi at all,

I want customize, for the component in object, the date format of the sensor last_boot.
I’m italian and I want the date format in dd.mm.yyyy.

system_last_boot:
    friendly_name: 'Last boot'
    value_template: "{{ as_timestamp(states.sensor.last_boot.state) | timestamp_custom('%-d.%m.%Y') }}"

I have no value from this template sensor.
Any idea ?
Thank you.

Use templated:

  • platform: template
    sensors:
    last_boot_templated:
    value_template: “{{ states.sensor.last_boot.state.split(’-’)[-1] }}/{{ states.sensor.last_boot.state.split(’-’)[1] }}/{{ states.sensor.last_boot.state.split(’-’)[0] }}”
    friendly_name: ‘Last Boot’
    icon_template: ‘mdi:clock’

Thank you very much, it’s perfect!!