clydebarrow / esphome

ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
https://esphome.io/
Other
16 stars 11 forks source link

QR code #91

Open nagyrobi opened 3 months ago

nagyrobi commented 3 months ago
  1. [ ] add qr-code-component to be usable as src in img and animimg widgets.
  2. [ ] extend it to be able to generate QRs at runtime from strings.

Perhaps as a LVGL sub-module.

Both ESPHome and LVGL use nayuki's library to generate QR codes, but ESPHome doesn't seem to be able to do it at runtime from a lambda:

qr_code:
  - id: homepage_qr
    value: !lambda 'return to_string("esphome.io");'

results in:

qr_code: [source config/test.yaml:112]
  - id: homepage_qr

    This option is not templatable!.
    value: !lambda |-
      return to_string("esphome.io");