Awesome
Home Assistant integration to create a QR-Code
This integration allows to create QR Codes with static or dynamic content.
Features
- Static content
- Dynamic content with the help of Templates
- Custom QR-Code color
- Custom QR-Code background color
- Error correction adjustment
{% if not installed %}
Installation
The easiest way to install is through HACS. This integration is already included in the HACS default repositories.
- In Home Assistant, select HACS -> Integrations -> + Explore and Download Repositories. Search for QR-Code Generator in the list and add it.
- Restart Home Assistant
- Set up and configure the integration:
Manual Installation
Copy the custom_components/qr_generator
directory to your custom_components
folder. Restart Home Assistant, and add the integration from the integrations page.
{% endif %}
Example configuration
For wifi access
Name: My wifi access
<br>
Content: WIFI:T:WPA2;S:MyNetworkName;P:ThisIsMyPassword;H:true;
For wifi access with template
Name: My wifi access
<br>
Content: WIFI:T:WPA2;S:MyNetworkName;P:{{states("input_text.wlan_password")}};H:true;
To update the QR code, simply change the value of
input_text.wlan_password
.
Details
Options
Options | Description | Default |
---|---|---|
Name | (str) Name of the QR Code. | - |
Content | (str) Content of the QR Code. Can be a template. | - |
Color | (str) Color of the QR Code in hex. Supports transparency (#RRGGBBAA). | #000 |
Background color | (str) Color of the background in hex. Supports transparency (#RRGGBBAA). | #FFF |
Scale | (int) Scale of the QR Code. | 10 |
Border | (int) Thickness of the QR Code border in "QR Code boxes". | 2 |
Error correction | (str) Strength of error correction. Possible values: <br> L - About 7% or less errors can be corrected. <br> M - About 15% or less errors can be corrected. <br> Q - About 25% or less errors can be corrected. <br> H - About 30% or less errors can be corrected. | H |
ATTRIBUTES
Attribute | Description |
---|---|
text | (str) Rendered content of the QR Code. |
color | (str) Color of the QR Code in hex. |
background_color | (str) Color of the background in hex. |
scale | (int) Scale of the QR Code. |
border | (int) Thickness of the QR Code border in "QR Code boxes". |
error_correction | (str) Strength of error correction. Possible values: <br> L<br> M <br> Q <br> H |