Skip to content
This repository was archived by the owner on May 28, 2022. It is now read-only.
This repository was archived by the owner on May 28, 2022. It is now read-only.

Add Value_Template - Modify the value with Jinja templating #16

@GuyKh

Description

@GuyKh

Is your feature request related to a problem? Please describe.
Using Authenticated for printing out last IP login.
One of the fields I use is date - and I get this:
image

Describe the solution you'd like
I'd really love to have the option to format the printed value.
e.g.

  - attribute: last_authenticated_time
    entity: sensor.last_successful_authentication
    prefix: '<b style=''font-weigth: bold; color: orange''>At: </b>'
    style:
      left: 5px
      top: 30%
      transform: none
     value_template: "{{ as_timestamp([value]) | timestamp_custom('%D %-I:%M %P') }}"     # <--- new part
    type: 'custom:state-attribute-element'

Describe alternatives you've considered
The other option I have is to create a template sensor, but that is much less dynamic and less flexible

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions