Rendering image entity in markdown card

Hi All,

I’m writing some guest instructions for “how to operate our house” for guests in a markdown card.

As part of this, I have a couple of qr codes generated by GitHub - DeerMaximum/QR-Code-Generator: Custom Home Assistant integration to create a camera that displays a custom QR-Code (one is wifi credentials for our guest network and one is my HA URL) which I’d like to render in the the card.

I’ve tried adding

### Guest Login 
*Local WIFI access only*
1. go to https://myurl.com
{{states('image.home_assistant')}}
{{state_attr('image.home_assistant', 'rendered_template')}}
{{state_attr('image.home_assistant', 'image')}}

which results in


Guest Login

Local WIFI access only

  1. go to https://myurl.com
    2023-08-28T00:03:18.741237+00:00
    None
    None

This isn’t going to help my guests log in :slight_smile: - is there any way to render a generated image entity in markdown? As far as I can see, the qr code generator never saves the QR code to a file, just updates the state of the image entity.

I’d love to be able to do the same to display a camera.

A bit late to the party, but:
You can just add a qr code directly in markdown:


type: markdown
content: <ha-qr-code data ='hallo'></ha-qr-code>

Unfortunately, this does not seem to be documented anywhere.
Found this by accident in the 2024-10 beta release notes in a screenshot:

1 Like