I am planning to add a horizonal banner (picture-element) above my floorplan in my lovelace UI. The banner shall change background depending of time of day.
See the example below, which is the start of my code. I would like to change “image:/local/timeofday/day.png” to another png-file depending on the state of a sensor which will have the states (sunrise, morning, day, sunset, evening, night), just like the “state_image”, but state_image only works for elements, not the background itself.
cards: - cards: - elements: - entity: sensor.example1 style: '--iron-icon-height': 20px '--iron-icon-width': 20px left: 5% top: 5% type: state-icon image: /local/timeofday/day.png type: picture-elements type: horizontal-stack - cards: - elements: - entity: sensor.example2 style: