Skip to content

Commit

Permalink
Weatherman sensor update for the new Moon in 2024.4 (no icon attr)
Browse files Browse the repository at this point in the history
Weatherman sensor update for the new Moon in 2024.4 (no icon attr). Thanks to Epaper member "cokeman" for the heads-up!
  • Loading branch information
chunkysteveo authored Apr 2, 2024
1 parent 82d1378 commit 171d94f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ha-configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >
Expand Down

0 comments on commit 171d94f

Please sign in to comment.