GithubHelp home page GithubHelp logo

Comments (10)

ercsey avatar ercsey commented on June 8, 2024 2

Same for me. Probably because sensor.moon has a state value of waning_gibbous which is not present in sun-card.js.

moonIcon(e) {
        const t = {
            new_moon: "new",
            waxing_crescent: "waxing-crescent",
            first_quarter: "first-quarter",
            waxing_gibbous: "waxing-gibbous",
            full_moon: "full",
            last_quarter: "last-quarter",
            waning_crescent: "waning-crescent"
        }[e];
        return t || console.error(`Sun Card: Unexpected state value '${e}' for moon sensor.`),
        `mdi:moon-${t}`

from sun-card.

JesCR avatar JesCR commented on June 8, 2024

Same here :/
My card:

      - type: "custom:sun-card"
        name: Orto-Ocaso
        entities:
          elevation: sun.sun
          max_elevation: sensor.max_elevation
          moon: sensor.moon
          noon: sensor.solar_noon
          sunrise: sensor.sunrise
          sunset: sensor.sunset
        style: |
          ha-card {
          --sc-sun-night-color: #606060;
          --sc-sunbeam-color: orange
          }

from sun-card.

mishaaq avatar mishaaq commented on June 8, 2024

In the newest version I've added some guard checks and validation of moon sensor state values. Could you check it out, please?

from sun-card.

JesCR avatar JesCR commented on June 8, 2024

Hi @mishaaq , i'm with the new version but still no moon :/
(BTW is day now, i should wait till night to see it?)

from sun-card.

mishaaq avatar mishaaq commented on June 8, 2024

(BTW is day now, i should wait till night to see it?)

No, it should be visible throughout the day. Can you check the console for entries prefixed with "Sun Card"?

from sun-card.

JesCR avatar JesCR commented on June 8, 2024

Nothing in the home-assistant.log with "sun" :/
(there are other place to check?)

from sun-card.

JesCR avatar JesCR commented on June 8, 2024

image

from sun-card.

mishaaq avatar mishaaq commented on June 8, 2024

Thanks for testing.
I meant browser's console - https://kb.mailster.co/how-can-i-open-the-browsers-console/

from sun-card.

JesCR avatar JesCR commented on June 8, 2024

Ok! :D

image

Maybe some "spanish character" like "ñ"?

from sun-card.

YoinkZed avatar YoinkZed commented on June 8, 2024

I see the exact same on my end. Running latest (Hass + Sun-Card):

image

from sun-card.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.