Lovelace 'Picture Entity Card' documentation regarding aspect ratio incorrect

I’m adding a camera to the frontend using the Lovelace Picture Entity Card but the documentation relating to aspect ratio seems to be incorrect.

The docs say that the aspect ratio should be a string, with examples being 16x9, 16:9 and 1.78, but the input type is set to number, and thus of the example values only 1.78 can be accepted, as you can’t type an x or : in the box.

If I enter 1.78, the image becomes really stretched horizontally:

Now, if I enter 56.25 (which is 9 divided by 16 as a percentage), the image shows at the correct 16:9 aspect ratio:

Chris

The docs refer to yaml mode, not in the UI Editor. If you change your configuration style by clicking the {} you’ll be able to add them as a ratio.

Ah ok!

I wonder if that should be mentioned somewhere in the Lovelace docs?

(I just had another check through and I don’t believe I can see it mentioned anywhere - but I’m happy to be corrected!)

You’re welcome to write up an issue or create a PR. Not sure what will come of it. Most of the documentation glosses over UI functionality. Mainly because the UI changes so much.

Fair enough, I understand. Thanks for the replies!

Chris

Hello, im having a similar issue…
The rtsp camera stream appears to be 4:3.
I place aspect_ratio: 16x9 by clicking the relevant {} button but that affects only the entity card and not the actual steam which remains 4:3 when i click on the card.
How can i force aspect ratio 16:9 to the stream hassio shows and not only the card?

1 Like