I have a variable configured in configuration.yaml and I show it like this:
type: vertical-stack
cards:
- type: entities
entities:
- entity: input_boolean.snail_mail
name: Finns det post i lådan
secondary_info: last-updated
icon: mdi:mailbox-up
state_color: true
The problem is that everytime HA is restarted, like on a update, the “last-updated” is reset which is misleading for me.
I have this automation:
alias: Turn on mailbox variable if vibration detected on lid
description: ""
trigger:
- type: vibration
platform: device
device_id: xx
entity_id: xx
domain: binary_sensor
condition: []
action:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.snail_mail
data: {}
mode: single
Is it possible to add a secondary entity that shows the last time the vibration sensor was vibrating?