Secondary_info: last-changed

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 %}
        }  

I think I went ahead but I can’t insert the “toggle” switch to activate / deactivate the input_bolean, can anyone help me?

type: entities
entities:
  - entity: binary_sensor.sensore_studio
    type: custom:multiple-entity-row
    secondary_info: last-changed
    show_name: false
    entities:
      - input_boolean.sensorestudioarm
    name: Studio
    icon: mdi:walk
    show_state: false
    card_mod:
      style: |
        :host { 
          --paper-item-icon-color:
              {% set e = states('binary_sensor.sensore_studio') %}
              {% set x = states('input_boolean.sensorestudioarm') %}
              {% 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 %}
        }  

1 Like