diff --git a/ha-configuration.yaml b/ha-configuration.yaml index 474fc5c..cd27653 100644 --- a/ha-configuration.yaml +++ b/ha-configuration.yaml @@ -15,8 +15,8 @@ template: state: "{{ now().isoformat() }}" attributes: moon_phase: > - {% set cond_moon = state_attr('sensor.moon_phase', 'icon') %} - {{ cond_moon.split('mdi:')[1] }} + {% set cond_moon = states('sensor.moon_phase') %} + {{ "moon-" + cond_moon | replace("_", "-") }} sun_next_rising: > {{ as_timestamp(state_attr("sun.sun", "next_rising")) | timestamp_custom('%-I:%M %p') }} sun_next_setting: >