Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

Conditional timestamp_custom

$
0
0

@dantist wrote:

Hi,

I’m using a custom_timestamp in a sensor to show when the front door was last opened:

as_timestamp(states.automation.tur_geschlossen.attributes.last_triggered) | timestamp_custom("%H:%M Uhr (%d.%m.)

But I only want to show the date ("%d.%m.") when the door was opened yesterday or earlier.

Is it possible to change the formatting depending on when the door was last opened?

Posts: 7

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles