Lovelace: Sun Card

@elRadix, are you implementing some of the custom theme variables for this card? If so would you be willing to share what your setting them to? Looks good!

Awesome. Works exactly as expected. Thanks for the effort :slight_smile:

I’m using the config from @krovachek which I little bit adapted

card:
  name: ' '
  type: 'custom:sun-card'
style:
  background-repeat: no-repeat
  background-size: 100% 100%
  border: 'solid 1.5px  # rgba(57,128,228)'
  border-radius: 10px
  '--sc-sunbeam-color': white
  '--sc-event-line-color': white
  '--sc-horizon-color': null
  '--sc-background': >-
    linear-gradient(rgba(1, 1, 254,  0%), rgb(0, 191, 255) 46%, rgb(0, 250, 
    124) 54%, rgba(11, 1,  40,  0%))
type: 'custom:card-modder'

this how it shows below with the default hass theme, the dark one above is using one the dark themes

image

2 Likes

Thanks, mishaaq, for your great work! :+1: It works very well with the sun2 sensor!

1 Like

I installed and configured the sun2 custom component, now, how to make the sun-card working with that component instead the default sun ?

Can you share the code to make sun2 component working with this card?

Great card… Just a suggestion; would it be possible to add moon phases to this card also? Or does it require an additional component?

1 Like

I think using the sun2 component it already have the moon phases, but i am not sure about it…

Hmm I don’t see Sun2 component in HACS, am I missing something?

You need to manually add the repo

1 Like

Hi, I would like to install this asswell.
If added the link to the repository. But Im not able to find the “sun cart” option
Am i missing something?

option

Add the repo by URL. Enter

I found that HACS is a different repository than the HASS.IO add on store.
I installed HACS and I`m searching to get it working now. I have no lovelace.yaml configuration.
Its is all done via UI. Any tips may be?

Thanks for your reply

On the screen shot you linked before (which is above) I see now you did add that repo. Have you then checked the plugins in HACS? If it doesn’t show there you can follow the github manual installation instructions for the card.

Just tried adding the repo myself and it won’t add. HACS seems to be playing up. Try adding using manual instructions.

Seems it’s already an issue on github. @ludeeus will fix it soon I’m sure but for now do a manual install.

Ok lets start from the beginning. I`m getting a bit confused here.
I love the layout of this card with the sun moving. So I want to integrate this in my home assistant setup.
What have i done so far:

  • If installed “HACS”
  • Installed “Sun Card”
  • Via HACS I installed “Sun2” (This one also seem to work)
  • Via the raw editor I`f added the “url: /community_plugin/sun-card/sun-card.js” and “url: /customcards/github/mishaaq/sun-card.js?track=true” because i did not know with one was needed.

I understand that sensor.time_utc is necessary to work. But I dont know how to install this component
What item do i use to create a card?
Hope some one can help me

Thanks in advance


Hi David,
Yes I have HACS installed now. Now I was able to add the sun card to the repository. With success in installed the plugin. I`f added the plugin to lovelace, and updated with the raw editor the following:

resources:
  - url: /community_plugin/sun-card/sun-card.js
    type: module

The box is green now, This all seems good.
Bu how do i add the card to the default screen?

nice card bro

1 Like

" The card depicts current moon phase if you have sensor.moon available in your configuration.yaml ."
I made this entry in Configuration.yaml. According to the description, the moon should appear in the representation. But this is not the case.
What’s the problem please?

  1. Make sure you have correctly configured moon integration https://www.home-assistant.io/integrations/moon/.
  2. Check if sensor.moon is enlisted among entities.
  3. Do you latest (3.3) version installed?

Same here, got moon sensor, latest sun card but no moon is showing up.

It also appears that if you have your Sun2 sensors ‘entity namespaced’ like I do that the card cant find them (makes sense) - i’ve opened a GitHub Issue for it