I’d like to create a library of custom javascript functions to be reused in Button Card.
I created a common_functions.js file in /config/www.
I added a resource to lovelace for the created file. (/local/common_functions.js)
I created a simple example function in file common_functions.js:
function test_function(input) {
var value = input + 1;
return value;
}
Custom button-card offers helpers object with functions prepared for formatting date/time values. Maybe thats the direction of considerations? Maybe it’s worth to take a look inside custom-button javascript code? If somebody has enough skills
True. But I believe this is not a resolved issue and I’m very interested in getting a kick to some direction. My skills are not greate in javascript modules/resources, so I try to kick somebody else