Hi, I have this in my tab but, I would like to add the information of the last change of “binary_sensor” as well, what can I do?
type: entities
entities:
- entity: input_boolean.portaingressoarm
name: Porta Ingresso
icon: mdi:exit-run
secondary_info: last-changed
card_mod:
style: |
:host {
--paper-item-icon-color:
{% set e = states('binary_sensor.porta_ingresso') %}
{% set x = states('input_boolean.portaingressoarm') %}
{% if (e == 'on' and x == 'on') %} red
{% elif (e == 'on' and x == 'off') %} orange
{% elif (e == 'off' and x == 'on') %} blue
{% elif (e == 'off' and x == 'off') %} gray
{% else %} lightgrey
{% endif %}
}