mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Add QR Code information to markdown (#34981)
* Add QR Code information to markdown the ha-rq-code tag is undocumented. This should be added * Update markdown.markdown typos corrected * Apply suggestions from code review * Apply suggestions from code review --------- Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
parent
b637b73810
commit
a5f45eafc0
@ -150,3 +150,28 @@ content: |
|
|||||||
<ha-alert alert-type="success">This is a success alert — check it out!</ha-alert>
|
<ha-alert alert-type="success">This is a success alert — check it out!</ha-alert>
|
||||||
<ha-alert title="Test alert">This is an alert with a title</ha-alert>
|
<ha-alert title="Test alert">This is an alert with a title</ha-alert>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## ha-qr-code
|
||||||
|
|
||||||
|
You can also create QR-Codes in the Markdown card.
|
||||||
|
|
||||||
|
Available parameters:
|
||||||
|
- data: The actual data to encode in the QR-Code
|
||||||
|
- scale: A scale factor for the QR code, default is 4
|
||||||
|
- width: Width of the QR code in pixels
|
||||||
|
- margin: A margin around the QR code
|
||||||
|
- error-correction-level: low; medium; quartile; high)
|
||||||
|
- center-image: An image to place on top of the qr code (might need a higher error-correction-level)
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
type: markdown
|
||||||
|
content: >-
|
||||||
|
<ha-qr-code data='hallo' width="180"></ha-qr-code>
|
||||||
|
|
||||||
|
<ha-qr-code data='hallo' scale="6" margin="0"
|
||||||
|
center-image="/static/icons/favicon-192x192.png"></ha-qr-code>
|
||||||
|
|
||||||
|
<ha-qr-code data='hallo' error-correction-level="quartile" scale="6"
|
||||||
|
center-image="https://brands.home-assistant.io/_/tuya/icon@2x.png"></ha-qr-code>
|
||||||
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user