My Home Assistant projects
Just been trying to figure out how to make new cards and get to know the frameworks
My first real try at a custom HA Lovelace card. The clock card requires the following to be put into the ui-lovelace.yaml file
resources:
- url: /local/clock-card.js
type: js
- url: https://unpkg.com/[email protected]/min/moment.min.js
type: js
For localisation, download the localise-file from here: https://github.com/moment/moment/tree/develop/locale and put your locale file in /local/locale/nl.js (example, replace ‘nl’ by the letters of your locale). And, modify ui-lovelace.yaml to show this:
resources:
...
- url: /local/locale/nl.js
type: js
Finally, open HA on the page where the clock-card is shown, then clean the cache and hard-reload 2 times. After that the localized time and date are shown.
So far mostly a copy/paste/edit of stuff from https://github.com/home-assistant/home-assistant-polymer/blob/dev/src/cards/ha-weather-card.js and https://github.com/rdehuyss/homeassistant-lovelace-alarm-clock-card/blob/master/alarm-clock-card.js