Skip to content

Commit

Permalink
Update ha-configuration.yaml
Browse files Browse the repository at this point in the history
mdi icons for full/new moon does not follow the same naming syntax as the other phases.
  • Loading branch information
JanJoh authored Apr 8, 2024
1 parent 288e20f commit 5804ff2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ha-configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ template:
attributes:
moon_phase: >
{% set cond_moon = states('sensor.moon_phase') %}
{% if cond_moon == 'new_moon' %}
moon-new
{% elif cond_moon == 'full_moon' %}
moon-full
{% else %}
{{ "moon-" + cond_moon | replace("_", "-") }}
{%endif%}
sun_next_rising: >
{{ as_timestamp(state_attr("sun.sun", "next_rising")) | timestamp_custom('%-I:%M %p') }}
sun_next_setting: >
Expand Down

0 comments on commit 5804ff2

Please sign in to comment.