#Markdown link to entity info?

1 messages · Page 1 of 1 (latest)

fallow zodiac
#

Hello community. I would like to have the ability to open an entity’s information page from a link within a markdown card. For example, if I click the bedroom temperature text (pic #1), the entity display pops up (pic #2).

Is there a link to these pop ups? Or JavaScript I can insert?

lavish nymph
#

You can create links in the Markdown card. ```yaml
type: markdown
content: |
Battery {{ states('sensor.s22_ultra_battery_level') }}% LINK

#

The next problem you'll run into is the more-info pop-ups don't have actual direct links that can be used.

lavish nymph
#

You can probably get all the information, styling, and actions if you were to use the custom:button-card. The syntax is a bit different but you can define your own layout similar to what you have in the Markdown. It may just take a bit of work.

#

This is something I threw together. I uses a stack-in-card to make two custom:button-cards look like a single card. ```yaml
type: custom:stack-in-card
cards:

  • type: custom:button-card
    entity: sensor.freezer_temperature
    show_icon: false
    name: |
    [[[ return <ha-icon icon="mdi:fridge-top" style="width: 25px; height: 25px; color: yellow; "></ha-icon>Freezer: + parseInt(entity.state) + '°F' ]]]
    styles:
    card:
    - padding: 0px
    - padding-top: 5px
    - margins: 0px
  • type: custom:button-card
    entity: sensor.refrigerator_temperature
    show_icon: false
    name: |
    [[[ return <ha-icon icon="mdi:fridge-bottom" style="width: 25px; height: 25px; color: red; "></ha-icon> <ha style="color: white;"> Refrigerator: <ha style="color: blue;"> + parseInt(entity.state) + entity.attributes.unit_of_measurement ]]]
    styles:
    card:
    - padding: 0px
    - margins: 0px
    - padding-bottom: 5px