The Google drive is working
Here’s my take on how I accomplished this in a Mushrrom Template Card. I copied all of the PNG images from the Google Drive link into a www/moon_phases
folder and then created the following card in my dashboard:
type: custom:mushroom-template-card
entity: sensor.moon
icon_color: ''
fill_container: false
picture: /local/moon_phases/{{states(entity)}}.png
primary: Moon Phase
secondary: |-
{% set phase = states(entity) %}
{% if phase == 'last_quarter' %} Last Quarter
{% elif phase == 'waning_crescent' %} Waning Crescent
{% elif phase == 'full_moon' %} Full Moon
{% elif phase == 'first_quarter' %} First Quarter
{% elif phase == 'waxing_gibbous' %} Waxing Gibbous
{% elif phase == 'new_moon' %} New Moon
{% elif phase == 'waning_gibbous' %} Waning Gibbous
{% elif phase == 'waxing_crescent' %} Waxing Crescent
{% endif %}
Works perfectly!
11 Likes
Hey guys, is it possible to resize the moon icon (like the other icons)?
Can I do it with card_mod?
I have tried many things but it doesn’t work.
hi i’m new here and i need some help. so moon phases work and what im trying to do is to have black card with white text (mushroom card) on white (light) theme and it works untill i reload page than i get this
type: custom:mushroom-template-card
entity: sensor.moon_phase
fill_container: false
picture: /local/moon_phases/{{states(entity)}}.png
primary: ''
secondary: |-
{% set phase = states(entity) %}
{% if phase == 'last_quarter' %} Last Quarter
{% elif phase == 'waning_crescent' %} Waning Crescent
{% elif phase == 'full_moon' %} Full Moon
{% elif phase == 'first_quarter' %} First Quarter
{% elif phase == 'waxing_gibbous' %} Waxing Gibbous
{% elif phase == 'new_moon' %} New Moon
{% elif phase == 'waning_gibbous' %} Waning Gibbous
{% elif phase == 'waxing_crescent' %} Waxing Crescent
{% endif %}
layout: vertical
badge_icon: ''
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
badge_color: ''
multiline_secondary: true
card_mod:
style: |
ha-card {
background: black;
--secondary-text-color: white;
}
as a new member i can only post one media file
any help would be greatly appreciated
thanks!
thank you kind sir, this still helps years later!