Card that shows which button (name) was pressed

Hi,

I try to bring my climate to home assistant via ESP IR transmitter and receiver.
I have a Button for my favorite settings in the climate (about 6 buttons),I also have installed a receiver on my board, and created sensors for each button.
When I no press a button or use the IR Remote from the climate, the sensor change to on for 200ms.

I now like to have a card on my Dashboard, where I can see the Name of the sensor, which was turning on and of.
When another Sensor turning on and of the name in the card should change to this sensor.

I put all the sensor under the same label, thought i can do it with auto entities card, but I hand no idea how to do…

thanks
Stefan

Hi Stefan, welcome to the forum!

You could store the buttons pressed in 1 single helper and show the state of it on your dashboard so it displays the last value.

Open your Home Assistant instance and show your helper entities.

Hi Nick,

thanks for your tip, I created the helper and this is working fine…

but how can I show “triggered by state of” in an entity card?
Can the name of the triggered entiity shown as name in the entity card?

my wish is that “1_Klima Satus” replaced by the last triggered entity in the helper “Climate Control Delonghi IR On 21°C Klima Full” shows up in the entity card

I have no experience with coding, working almost with visual editor, and copy and paste of YAML in the forum.

Found a Solution,

Create an automation, and in actions use persistent_notification.create

I now see the Status of the climate, in an entity card, the state change when the button in HomeAssistant ist pressed or when the IR Remote Control sets the temp in the climate

Automation

alias: 1_Klima Status
description: ""
triggers:
  - trigger: state
    entity_id:
      - binary_sensor.climate_control_delonghi_ir_on_21degc_klima_full
      - binary_sensor.climate_control_delonghi_ir_on_21degc_klima_middle
      - binary_sensor.climate_control_delonghi_ir_on_21degc_klima_silent
      - binary_sensor.climate_control_delonghi_ir_on_22degc_klima_full
      - binary_sensor.climate_control_delonghi_ir_on_22degc_klima_middle
      - binary_sensor.climate_control_delonghi_ir_on_22degc_klima_silent
      - binary_sensor.climate_control_delonghi_ir_on_23degc_klima_full
      - binary_sensor.climate_control_delonghi_ir_on_23degc_klima_middle
      - binary_sensor.climate_control_delonghi_ir_on_23degc_klima_silent
      - binary_sensor.climate_control_delonghi_ir_delonghi_off
    to: "on"
conditions: []
actions:
  - action: persistent_notification.create
    data:
      message: " {{ trigger.to_state.attributes.friendly_name}} "
      title: Klima
    enabled: false
  - action: input_text.set_value
    metadata: {}
    data:
      value: "{{ trigger.to_state.attributes.friendly_name}} "
    target:
      entity_id: input_text.klima_text
mode: single

Dashboard, Mushroom Entitity Card

type: custom:mushroom-entity-card
entity: input_text.klima_text
layout: horizontal
fill_container: true
grid_options:
  columns: 24
  rows: 1
icon_color: primary
icon: mdi:snowflake-thermometer
primary_info: state
secondary_info: last-changed