Hello, I try to get the moon phases picture on my HA. But I only get a black circle.
I try this code:
type: custom:mushroom-chips-card
chips:
- type: template
style: |
ha-card {
--chip-background: url( {% set state = states('sensor.moon') %} /local/moon_phases/{{state}}.png ) no-repeat center center;
}
and this code:
type: custom:mushroom-chips-card
chips:
- type: template
card_mod:
style: |
ha-card {
{% set phase = states('sensor.moon') %}
--chip-background: url( '/local/moon_phases/{{ phase }}.png' ) no-repeat center center;
}
But with both codes are only the black circle.
My pictures are 36 x 36 px and I save it under:
www/moon_phases/
If I enter the following adress in the browser:
https://homeassistant.local:8123/local/moon_phases/waxing_crescent.png
I see the picture. What make I wrong?