Home Assistant weblink extractor and static generator for a simple link dashboard.
This is a clean room implementation of a Python script that will take an existing HA data yaml file and generate a quick-n-dirty html file, without the need to migrate existing data file/format/syntax.
Home Assistant no longer supports weblink, https://www.home-assistant.io/lovelace/entities/#weblink should be used instead.
Old weblink:
If looking for a simple launcher dashboard take a look at:
python -m pip install pyyaml
python ha_weblink.py sample.yaml > sample.html
If filename is not specified, data.yaml
is assumed.
Sample, data.yaml:
weblink:
entities:
- name: Router
url: http://127.0.0.1/
icon: mdi:router-wireless
Where icon names are:
mdi:...
or without mdi prefix - just like Home Assistant (used to support)http....
- NOT supported by HAtext:any text or emjoi
- NOT supported by HAIf no icon is specified a favicon in default location (/favicon.ico) is assumed, similar to #2 (an extension on the Home Assistant original implementation).
Can easily pull icons straight from google with the following URL - https://www.google.com/s2/favicons?domain=``{Serivce URL}&sz={PIXEL SIZE}
, for example https://www.google.com/s2/favicons?domain=https://www.portainer.io/&sz=256
Usage:
python ha_weblink.py > index.html