[X] I updated the card to the latest version available
[X] I cleared the cache of my browser
Describe the bug
When attempting to use a javascript template to set an inline SVG as a background image, the proper image is shown on the initial page load, however when changing states after page load, the template appears to not work and the background image is not updated. I have tried multiple variations of double and single quotes as well as template literal. I am 100% sure the state change is being picked up because I put an alert() in the javascript template for testing and attached a debugger. I also tried triggers_update: all just to be sure.
In the example below, if the value of the input_select is 'red' on page load the svg will be shown. If I then update the value to something else, the greentest.png will be show. Changing the state back to 'red' results in no change to the background image. There are no errors which appear in the console dev tools.
Checklist
Describe the bug When attempting to use a javascript template to set an inline SVG as a background image, the proper image is shown on the initial page load, however when changing states after page load, the template appears to not work and the background image is not updated. I have tried multiple variations of double and single quotes as well as template literal. I am 100% sure the state change is being picked up because I put an alert() in the javascript template for testing and attached a debugger. I also tried triggers_update: all just to be sure. In the example below, if the value of the input_select is 'red' on page load the svg will be shown. If I then update the value to something else, the greentest.png will be show. Changing the state back to 'red' results in no change to the background image. There are no errors which appear in the console dev tools.
Version of the card Version: 4.11
To Reproduce This is the configuration I used:
Screenshots No screenshots needed
Expected behavior Background image should change when state of input_text changes
Desktop (please complete the following information):
Smartphone (please complete the following information): None
Additional context I imagine his has something to do with the inline SVG as other image types seem to work fine.