hi
i have xiaomi door and motion sensor and i am using the Lovelace UI
i want to present the last time was motion on the sensor
and when last time the door was opened/Closed
such as:
hi
i have xiaomi door and motion sensor and i am using the Lovelace UI
i want to present the last time was motion on the sensor
and when last time the door was opened/Closed
such as:
Tnx for the reply
how i implement this , for example this is the code right now:
entities:
- type: entities
title: Entities card sample
entities:
- entity: binary_sensor.door_window_sensor_158d0002b5312
name: Window
secondary_info: last-changed
- entity: binary_sensor.motion_sensor_158d0002b93f8
name: Motion
secondary_info: last-changed
I get this Error
Look at the indentation of my example.
YAML is a bitch!
This is 1:1 as your example, and still get error
Are these entity_id’s valid?
Please check in Dev Tools/states (< >)
Do as asked please.
Why TF do people come here and ask for help, and then not respond to what is asked?
Confusion with the Ui Card Editor.
In yaml mode (what i use) there’s a hyphen in front of the type
.
In the UI Card editor it is not.
So in the card editor it should look like
type: entities
title: Entities card sample
entities:
- entity: binary_sensor.door_window_sensor_158d0002b5312
name: Window
secondary_info: last-changed
- entity: binary_sensor.motion_sensor_158d0002b93f8
name: Motion
secondary_info: last-changed
VDRainer, TNX for the help!
Now it show when the last action happened:
if i want the to see when the last action was in time (for example: 20:33)
u try to use this, but it not working:
type: entities
title: Entities card sample
entities:
Thats not possible, there is no format option for the secondary_info, it’s for the state value.
Hi
i have question, i use the code according to your answers in 2 cards (sensor and device tracker, the code attached)
but if i reset the HA, the last change count only from the last reset, but if i check the data in the sensor i see different time:
After HA reset:
Sensor data:
The code:
entities:
This is normal
No clue with the data in the graph, but the graphs are always a little buggy.
How to add secondary_info: last-changed to type: custom:card-modder
My Card: