Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
How it works
Since I'm lazy I will reference [cards, components, python_scripts] as element/elements here.
This uses pyupdate to handle most of its functions.
By default this component checks for updates for your elements against two files hosted on GitHub.
There is no default list for python_scripts
These lists are autogenerated by https://github.com/ludeeus/customjson, developers are welcome to add their elements to that tool, the default lists are updated once every hour, and this component checks it on startup, once every day and when you use the service
custom_updater.check_all or click the
CHECK button if you are using the
Elements not in the default list can also be tracked by adding them to the
*_urls options in the config:
For this to work the developer has to make a json file you can add the URL to.
Special notes for custom_cards
In the "early days" of this component (before
4.0.0) it used a
?v=xxx tag at the end of the resources you had in your
ui-lovelace.yaml file, this was done to have some sort of "control" of the file version, and it also served as a cache buster when your elements got upgraded.
4.0.0 it now comes with a new endpoint
/customcards that are similar to
/local but without caching, local version control is also moved to
To take advantage of this new "cacheless" endpoint you need to use that in the resource section of your lovelace configuration.
resources: - url: /local/my-custom-card.js?v=0.0.3 type: js - url: /local/custom-lovelace/my-custom-card.js?v=0.0.3 type: js - url: /local/custom-lovelace/my-custom-card/my-custom-card.js?v=0.0.3 type: module
resources: - url: /customcards/my-custom-card.js type: js - url: /customcards/custom-lovelace/my-custom-card.js type: js - url: /customcards/custom-lovelace/my-custom-card/my-custom-card.js type: module
So this means when you add a card to be tracked after version
4.0.0 you follow the instructions from the developer of that card, but when you get to the part where you add it to the resources you replace
Note: The card should still be under
/customcards/ also uses this directory to serve the files.
When you add a new card, this component will not know the version it has, but it assumes that you downloaded the latest version.
Upgrading from pre
4.0.0 and custom_cards.
First of all you should read this https://github.com/custom-components/custom_updater/releases/tag/4.0.0
The first time you start up it will not know the local version of your cards, to solve this run the service
custom_updater.update_all or click the "UPDATE ALL"button if you are using the
This endpoint are designed to work with custom cards that this component track and update, but you can also use it for other things you don't want to be cached like cards in development, images, and other dynamic/semi-dynamic files.
When using this component, every item you can reference with
http(s)://haurl/local/ can also be referenced as
http(s)://haurl/customcards/ to skip caching of that resource.
Like with the
/local endpoint the resources still need to be in the
www directory (folder).
When you use this to update your elements with the service
custom_udater.update_all or the "UPDATE ALL" button in the tracker-card, you need to take an extra manual step for it to take effect.
If you update a component you need to restart Home Assistant.
If you update cards you need to reload the frontend (F5).