I copied and paste your code and got error seen in picture below. I installed card mod from HACS and added entry into my configuration.yaml to point to where HACS installed the .js file.