1,原库:https://github.com/jeremyhamm/home-assistant-moon
2,网友修改:https://bbs.hassbian.com/thread-14450-1-1.html
3,本人只是修改成适合自己观感
--------------------以下原说明---------------------------
Custom card for displaying the current phase of the moon in Home Assistant using the moon integration. This card also (optionally) uses the Sun Entity to determine the background color of the card.
Enable the moon integration by adding the following to configuration.yaml:
sensor: - platform: moon Install moon-card by copying moon.js and images from this repo to <config directory>/www/moon-phases on your Home Assistant instance.
Link moon-card inside your ui-lovelace.yaml.
resources: - url: /local/moon-phases/moon.js type: module | Name | Type | Default | Reference | Description |
|---|---|---|---|---|
| type | string | Required | custom:moon-phases | Card reference |
| entity | string | Required | sensor.moon | Moon entity |
| entity | string | Optional | sun.sun | Include if you would like the card to use light mode while sun is up |
type: 'custom:moon-phases' entities: - sensor.moon - sun.sun 
