[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-109936":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":14,"stars7d":15,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":13,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":22,"topics":23,"createdAt":10,"pushedAt":31,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},109936,"ha-ani-weather-card","alexsto1an\u002Fha-ani-weather-card","alexsto1an","Live weather, on your dashboard: a Home Assistant card that turns your forecast into a living sky, with a sun tracker to match.","https:\u002F\u002Falexsto1an.github.io\u002Fha-ani-weather-card\u002F",null,"TypeScript",134,6,1,10,0,79,57.44,"MIT License",false,"main",true,[24,25,26,27,28,29,30],"hacs","home-assistant","lovelace","lovelace-custom-card","sun-tracker","weather","weather-card","2026-11-19 09:35:29","2026-11-22 15:29:59","![The Animated Weather Card icon: the sky, the sun and the rain behind a pane of glass](docs\u002Fimages\u002Ficon.webp)\n\n# Animated Weather Card\n\n**Live weather, on your dashboard.**\n\n[![GitHub Release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Falexsto1an\u002Fha-ani-weather-card?style=flat-square)](https:\u002F\u002Fgithub.com\u002Falexsto1an\u002Fha-ani-weather-card\u002Freleases)\n[![HACS Default](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHACS-Default-41BDF5.svg?style=flat-square)](https:\u002F\u002Fhacs.xyz\u002F)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Falexsto1an\u002Fha-ani-weather-card?style=flat-square)](https:\u002F\u002Fgithub.com\u002Falexsto1an\u002Fha-ani-weather-card\u002Fblob\u002Fmain\u002FLICENSE)\n\n![Three weather cards over Lisbon, each with its note: a sunny afternoon, a thunderstorm and a clear night](docs\u002Fimages\u002Fhero.webp)\n\nAnimated Weather Card turns a Home Assistant weather entity into a living sky. The condition and the time of day set the light. Rain, snow, fog, wind, lightning and clouds move behind the numbers, and the temperature is always the first thing you read. Under the conditions, your AI can write a note about the hours ahead. A matching sun tracker card comes in the same download.\n\nIt's free, open source and made for Home Assistant. You can [try it live](https:\u002F\u002Falexsto1an.github.io\u002Fha-ani-weather-card\u002F) in your browser first, on sample data.\n\n[Live demo](https:\u002F\u002Falexsto1an.github.io\u002Fha-ani-weather-card\u002F) · [Install](#install) · [Set up](#set-up) · [Examples](#examples) · [Options](#options) · [Troubleshooting](#troubleshooting)\n\n---\n\n## Weather you can see.\n\nEach condition has its own sky and its own motion, and both follow what your weather entity reports. Rain falls at a steady pace and splashes on the card's lower edge. Snow drifts with the wind, the smaller flakes farther away. Fog drifts in layers, leaves blow across on windy days, and lightning lights the sky from above. The live wind speed sets how fast it all moves.\n\n![Eight compact cards: rainy, pouring, snowy, snow and rain, cloudy, fog, windy and hail](docs\u002Fimages\u002Fconditions.webp)\n\n## It follows the sun.\n\nThe sky moves through dawn, day, dusk and night with the real sun, read from Home Assistant's `sun.sun`. When the light changes, one sky dissolves into the next over about three seconds.\n\n![The same partly cloudy card at dawn, midday, dusk and night](docs\u002Fimages\u002Fphases.webp)\n\n## Your AI writes the note.\n\nTurn on `show_note` and the card hands Home Assistant's AI the hours ahead: when the rain starts and stops, the high and the low, the gusts, the UV, and when you're out, from your calendar. It writes back a line and a longer note, and the card shows whichever fits. Pick its voice: snarky, calm, friendly or dry. Serious weather always gets plain advice. Every screen you're signed in on shares the one note, rewritten as the forecast changes. It needs Home Assistant 2025.8 or later with an AI Task. [Set it up](#a-note-from-your-ai), or [try each voice](https:\u002F\u002Falexsto1an.github.io\u002Fha-ani-weather-card\u002F#note) in the live demo.\n\n![Four cards on the same rainy afternoon, each with a sample note in a different voice: snarky, calm, friendly and dry](docs\u002Fimages\u002Fnote.webp)\n\n## A sun tracker to match.\n\nThe download includes a second card, just for the sun. It shows the sun's path across the day, with the next sunrise or sunset as the headline. Below are first light, last light, solar noon, the length of the day and the moon phase. Its sky follows the sun in the same palette as the weather card.\n\n![The sun tracker in the late afternoon and after dark, with a full moon](docs\u002Fimages\u002Ftracker.webp)\n\n## Better together.\n\nStack a compact sun tracker under the weather card and the two read as one piece. They share your weather entity's sky, their text lines up, and rain falling out of the weather card passes behind the tracker. [Set it up](#weather-and-sun-tracker).\n\n![A weather card with a compact sun tracker underneath, by day and by night](docs\u002Fimages\u002Fpair.webp)\n\n## Fits any frame.\n\nThe card works in a narrow phone column, a sections grid or on a wall tablet across the room:\n\n- **Metrics:** they share one row when they fit and fold into a grid when they don't, measured against the actual labels in your language.\n- **Wide cards:** the metrics move beside a larger temperature.\n- **Short sections rows:** the card steps down to tighter layouts instead of clipping.\n- **One line:** `compact: true` gives you a single strip.\n\n![A wide card on a wall tablet: the temperature on the left, four metrics on the right, rain falling across both](docs\u002Fimages\u002Fwall.webp)\n\n## Planes, actually overhead.\n\nConnect the [Flightradar24 integration](https:\u002F\u002Fgithub.com\u002FAlexandrErohin\u002Fhome-assistant-flightradar24) and each flight that enters your area crosses the card once. It flies at its real heading, altitude and speed, with its flight number and aircraft type beside it. Each is drawn as its aircraft, from its type: an airliner, a wide-body, a 747, a regional or business jet, a turboprop, a light aircraft or a helicopter, longer for a longer aircraft. Cruising traffic flies small and high, and arrivals come in lower and larger. After dark, a plane is its lights: green or red at the wingtip facing you, flashing white strobes and a red beacon.\n\n![A Boeing 787 crossing a clear afternoon sky, and a 747 crossing a clear night, shown by its lights](docs\u002Fimages\u002Fplanes.webp)\n\n## At home in any theme.\n\nPrefer your dashboard's own look? The theme palette drops the sky and draws the weather in your theme's colours, light or dark. Or keep the sky and recolour it: pick per-condition colours in the editor, or define whole gradients in your theme.\n\n![The theme palette on a light dashboard and on a dark one](docs\u002Fimages\u002Ftheme.webp)\n\n## The details.\n\n- **Speaks your language.** Conditions, the humidity, wind and pressure labels, and the moon phase come from Home Assistant's own translations. The cards' own words, like \"Feels like\" and \"Sunset\", are in nine languages, and fall back to English in others. Times follow your profile's 12- or 24-hour setting.\n- **Your own sensors.** Point the card at your weather station and it shows what they measure: temperature, feels like, humidity, wind and pressure, indoors and out. The sky still follows the forecast.\n- **Updates in place.** New readings fade in without a re-render. When the condition changes, the old weather fades out as the new one arrives.\n- **Rests when unseen.** Motion pauses while the tab is hidden or the card is scrolled out of view. It can also pause while the window is in the background.\n- **Respects reduced motion.** If reduced motion is on in your system settings, the sky stays still: the same colour and light, with no moving weather.\n- **Readable in every sky.** Text sits above the weather, and every built-in sky is tested to meet WCAG AA contrast for the card's text. Screen readers hear temperature and condition changes, and decorative layers are hidden from them.\n- **Light to load.** The card is about 77 KB gzipped, with GSAP, its animation library, inside, so it moves without internet access. The visual editor, the note writer, the planes and the developer panel load only when they're needed.\n- **Set up visually.** Every weather card option is in the visual editor. YAML is there when you want it.\n\n## Built with AI.\n\nAI helped build this card. Its code, tests and documentation were developed with an AI assistant, under my direction. I review every change, and each one has to pass the test suite before I merge it. The card runs every day on my own dashboard. If you'd rather not use software made with AI, you know before you install.\n\n---\n\n## Install\n\nThe [setup guide](https:\u002F\u002Falexsto1an.github.io\u002Fha-ani-weather-card\u002Fsetup\u002F) walks through every step, from HACS to the weather note, with troubleshooting.\n\n### What you need\n\n- **A weather entity.** Any weather integration works: Met.no, OpenWeatherMap, AccuWeather, Pirate Weather, the National Weather Service and others.\n- **Optional:** an AI integration with an AI Task (Home Assistant 2025.8 or later) for the weather note, the [Moon](https:\u002F\u002Fwww.home-assistant.io\u002Fintegrations\u002Fmoon\u002F) integration for the tracker's moon phase, and the [Flightradar24 integration](https:\u002F\u002Fgithub.com\u002FAlexandrErohin\u002Fhome-assistant-flightradar24) for planes.\n\nThe card ships as five files that sit in the same folder:\n\n| File | What it is |\n| --- | --- |\n| `animated-weather-card.js` | Both cards. This is the only dashboard resource you add. |\n| `animated-weather-card-editor.js` | The visual editors for both cards. It loads the first time you open a card's settings. |\n| `animated-weather-card-note.js` | The note writer. It loads only for cards that write their own note (`show_note`). |\n| `animated-weather-card-planes.js` | The planes. It loads only for cards with a flights sensor (`flights_entity`). |\n| `animated-weather-card-dev.js` | The developer panel. It loads only for cards with `dev_mode: true`, so a manual install can leave it out. |\n\n### HACS\n\n1. Open HACS and search for **Animated Weather Card**.\n2. Select it, then select **Download**.\n3. Refresh your browser.\n\nIf the search doesn't find it, add it as a custom repository and search again:\n\n1. Open HACS and select ⋮ (top right) → **Custom repositories**.\n2. Paste `https:\u002F\u002Fgithub.com\u002Falexsto1an\u002Fha-ani-weather-card` and choose the type **Dashboard**.\n\nHACS adds the dashboard resource for you when your dashboards are managed in the UI. For YAML-mode dashboards, add it yourself:\n\n```yaml\nresources:\n  - url: \u002Fhacsfiles\u002Fha-ani-weather-card\u002Fanimated-weather-card.js\n    type: module\n```\n\n### Manual\n\n1. Download [`animated-weather-card.js`](https:\u002F\u002Fgithub.com\u002Falexsto1an\u002Fha-ani-weather-card\u002Freleases\u002Flatest\u002Fdownload\u002Fanimated-weather-card.js), [`animated-weather-card-editor.js`](https:\u002F\u002Fgithub.com\u002Falexsto1an\u002Fha-ani-weather-card\u002Freleases\u002Flatest\u002Fdownload\u002Fanimated-weather-card-editor.js) and [`animated-weather-card-note.js`](https:\u002F\u002Fgithub.com\u002Falexsto1an\u002Fha-ani-weather-card\u002Freleases\u002Flatest\u002Fdownload\u002Fanimated-weather-card-note.js) from the [latest release](https:\u002F\u002Fgithub.com\u002Falexsto1an\u002Fha-ani-weather-card\u002Freleases\u002Flatest). Add [`animated-weather-card-planes.js`](https:\u002F\u002Fgithub.com\u002Falexsto1an\u002Fha-ani-weather-card\u002Freleases\u002Flatest\u002Fdownload\u002Fanimated-weather-card-planes.js) if you fly planes, and [`animated-weather-card-dev.js`](https:\u002F\u002Fgithub.com\u002Falexsto1an\u002Fha-ani-weather-card\u002Freleases\u002Flatest\u002Fdownload\u002Fanimated-weather-card-dev.js) if you want developer mode. You can also build them from source with `npm install && npm run build`.\n2. Copy the files to your `config\u002Fwww\u002F` folder. If you had to create `www\u002F`, restart Home Assistant once so `\u002Flocal\u002F` is served.\n3. Go to **Settings → Dashboards → ⋮ → Resources → Add resource** and add:\n   - URL: `\u002Flocal\u002Fanimated-weather-card.js?v=1`\n   - Type: **JavaScript module**\n\n   If Resources isn't shown, turn on Advanced mode in your user profile. For YAML-mode dashboards:\n\n   ```yaml\n   resources:\n     - url: \u002Flocal\u002Fanimated-weather-card.js?v=1\n       type: module\n   ```\n\n4. Refresh your browser.\n\nTo update a manual install, overwrite the files and raise the `?v=` number in the resource URL so browsers fetch the new version. The editor, the note writer, the planes and the developer panel pick up the same `?v=` automatically.\n\n> **Load the card from one place only.** If you switch between HACS (`\u002Fhacsfiles\u002F`) and a manual install (`\u002Flocal\u002F`), remove the old resource. Otherwise the second copy can't register, and you keep running whichever version loaded first.\n\n## Set up\n\n1. Edit your dashboard, select **Add card** and search for **Animated Weather Card**. It starts on your weather entity and `sun.sun`.\n2. If you have more than one weather entity, pick the one you want. That's enough to start.\n3. Adjust the rest in the editor's sections:\n   - **Entities**\n   - **Display**\n   - **Interactions**\n   - **Weather note**\n   - **Day and night**\n   - **Advanced**\n   - **Weather engine**\n   - **Colors**\n\nFor the sun tracker, search for **Animated Sun Tracker**. It starts on `sun.sun`, with your moon sensor if you have one.\n\nIn Home Assistant 2026.6 and later, the **By entity** tab suggests both cards too: pick your weather entity, or `sun.sun`, and they're under **Community**, regular and compact.\n\nOr in YAML:\n\n```yaml\ntype: custom:animated-weather-card\nentity: weather.forecast_home\n```\n\n## Examples\n\nEvery example below is a complete card configuration. Replace the entity IDs with your own.\n\n### The essentials\n\nThe sky follows `sun.sun` on its own. Add `sun_entity` to also show the next sunset (or, at night, sunrise) beside the other metrics.\n\n```yaml\ntype: custom:animated-weather-card\nentity: weather.forecast_home\nsun_entity: sun.sun\n```\n\n### Your own sensors\n\nYour sensors take the place of the weather entity's values, and a wind speed sensor also sets how fast the weather moves. A wind direction sensor can report degrees or a compass point like `NW`. Any sensor that's unavailable falls back to the weather entity. Without `feels_like_entity`, the card uses the entity's apparent temperature if it reports one. Indoor readings sit under the condition.\n\n```yaml\ntype: custom:animated-weather-card\nentity: weather.forecast_home\nname: Garden\nsun_entity: sun.sun\noutdoor_sensor_entity: sensor.garden_temperature\nfeels_like_entity: sensor.garden_apparent_temperature\nhumidity_sensor_entity: sensor.garden_humidity\nwind_speed_sensor_entity: sensor.garden_wind_speed\nwind_direction_sensor_entity: sensor.garden_wind_direction\npressure_sensor_entity: sensor.barometer\nindoor_temperature_entity: sensor.living_room_temperature\nindoor_humidity_entity: sensor.living_room_humidity\n```\n\n### Weather and sun tracker\n\nThis is the pairing in the screenshot above. `show_sun: false` leaves the next sunset to the tracker, which frees a slot so the weather card's three remaining metrics can share one row. `weather_entity` gives the tracker the weather card's sky.\n\n```yaml\ntype: vertical-stack\ncards:\n  - type: custom:animated-weather-card\n    entity: weather.forecast_home\n    sun_entity: sun.sun\n    show_sun: false\n  - type: custom:animated-sun-tracker-card\n    sun_entity: sun.sun\n    moon_entity: sensor.moon_phase\n    weather_entity: weather.forecast_home\n    compact: true\n```\n\n### Two strips\n\nBoth cards in compact form. Together they take about 200 px: the temperature, the condition and the next sunrise or sunset.\n\n```yaml\ntype: vertical-stack\ncards:\n  - type: custom:animated-weather-card\n    entity: weather.forecast_home\n    compact: true\n  - type: custom:animated-sun-tracker-card\n    sun_entity: sun.sun\n    weather_entity: weather.forecast_home\n    compact: true\n```\n\n### Sections view\n\nBoth cards size themselves in the sections view, and you can resize them freely:\n\n- **Weather card:** 12 columns × 4 rows by default, 12 × 5 with a note, or 12 × 2 compact.\n- **Sun tracker:** 12 × 6 by default, or 12 × 2 compact.\n\nIf you give a card fewer rows, it steps down to fit, and stops at the first layout that does:\n\n1. The line under the condition goes first.\n2. Then the temperature shrinks.\n3. Then the location goes.\n4. Then the metric labels go, and the temperature shrinks again.\n\nA note gives way before any of these: the spacing tightens to keep it whole, then it shortens to one line, then the temperature shrinks to keep that, then it goes.\n\nOn a phone, the default four rows show the card without its location and without the line under the condition, with the metrics and their labels in a grid. With a note, its five rows keep everything, with a smaller temperature and the note on one line.\n\n```yaml\ntype: custom:animated-weather-card\nentity: weather.forecast_home\nsun_entity: sun.sun\ngrid_options:\n  columns: 12\n  rows: 3\n```\n\n### Wall tablet\n\nA panel view gives the card the whole screen. Above 640 px wide, the metrics move to the right of a larger temperature. This is a view configuration: paste it in the dashboard's raw configuration editor, under `views:`.\n\n```yaml\ntitle: Weather\ntype: panel\ncards:\n  - type: custom:animated-weather-card\n    entity: weather.forecast_home\n    sun_entity: sun.sun\n    indoor_temperature_entity: sensor.living_room_temperature\n    indoor_humidity_entity: sensor.living_room_humidity\n```\n\n### Blend with your theme\n\nThe theme palette uses your dashboard's card background and text colours, in light and dark themes.\n\n```yaml\ntype: custom:animated-weather-card\nentity: weather.forecast_home\ncolor_palette: theme\n```\n\n### Planes overhead\n\nThis needs the [Flightradar24 integration](https:\u002F\u002Fgithub.com\u002FAlexandrErohin\u002Fhome-assistant-flightradar24). Set `show_flight_labels: false` to fly the planes without their tags.\n\nEach flight is drawn from the side as its aircraft, picked from the ICAO type code Flightradar24 reports: a narrow-body airliner (A320, 737, E190), a wide-body (787, 777, A350), a four-engine jet (747, A380), a jet with its engines at the tail (CRJ, MD-80, and business jets at their own length), a turboprop (ATR, Dash 8), a light aircraft (Cessna, Piper) or a helicopter. An unknown type flies as an airliner. Longer aircraft look longer, though less than in life, so a low 747 never covers the temperature. After dark, with the sky palette, a plane is its lights: steady green at the near wingtip of a plane flying right and red flying left, white strobes that flash twice, a red beacon and a white tail light. With `color_palette: theme` it stays a silhouette in your theme's colour.\n\n```yaml\ntype: custom:animated-weather-card\nentity: weather.forecast_home\nsun_entity: sun.sun\nflights_entity: sensor.flightradar24_current_in_area\n```\n\n### A note from your AI\n\nThe card can write a sentence under the conditions: a remark on the weather, what's coming in the next hours and what to wear. It's snarky by default.\n\n```yaml\ntype: custom:animated-weather-card\nentity: weather.forecast_home\nsun_entity: sun.sun\nshow_note: true\n# Optional\nnote_tone: calm                 # snarky, calm, friendly or dry\nnote_calendar: calendar.family  # when you're out, for what to wear\n```\n\n**What it needs.** Home Assistant writes the note with its AI Task, so it works with whichever AI you've set up there. You need Home Assistant 2025.8 or later and an AI integration that provides an AI Task: OpenAI, Google, Ollama, OpenRouter, Anthropic (2025.12 or later) or Home Assistant Cloud. The card uses the default AI Task from Settings → System → AI, or the one you name in `note_ai_task_entity`. Your API key stays in Home Assistant; the card never sees it.\n\n**How it's written.**\n\n- **Facts first.** The card reads the hourly forecast and works out what it says: when the rain starts and stops, the high and low, gusts, UV, and how it'll feel when you're out. The AI only puts those facts into words, and is told never to invent a time or a temperature.\n- **Four voices.** `snarky`, the default, is theatrical and a little unhinged, in the spirit of CARROT Weather: the weather has motives and the joke lands at the end. `calm` is plain and impersonal, like Apple Weather. `friendly` talks to you like a friend who checked the forecast for you. `dry` is deadpan: short, flat and mildly unimpressed.\n- **Your calendar.** With `note_calendar`, the card reads the next 12 hours of events and says what to wear for each stretch you're out. Timed events count; all-day, cancelled and online ones (a location that's a link) don't, and events less than half an hour apart count as one stretch. Only the times reach the AI, never an event's name, place or description.\n- **Serious weather gets no jokes.** Thunderstorms, hail, heavy rain, gale-force gusts and dangerous cold or heat switch any voice to plain advice.\n- **Your language.** It writes in your profile's language, with your units and your 12- or 24-hour clock.\n- **Two lengths.** It writes a one-line version for short frames and a longer one where there's room, and shows one whole or not at all.\n- **No stale flash.** When you come back to the card and a new note is due, a short status takes its place while it's written (reading the forecast, then writing the note), and the new note types itself in, rather than the old one showing first. With reduced motion, it's simply there.\n\n**What it costs.** The note is rewritten after an hour, or sooner when the forecast changes, and only while a screen is showing the card. Every screen you're signed in on shares one note, through your Home Assistant user. Each note is one small request, about 1,000 tokens in and 60 out: with the settings below, about $0.20 a month for a card on all day.\n\nIf there's no AI Task, or a note can't be written, the card shows no note and is otherwise the same. The browser console says why, and so does the editor.\n\n#### Choosing the AI\n\nThe card has already worked out the facts, so the AI only writes two short sentences. A small, fast model does it best, with as little thinking as it allows: thinking adds seconds and cost to every note, and nothing to it. Set this up in the AI integration's **AI Task** options (Settings → Devices & services → the integration → the AI Task's settings), not its conversation agent's, then make it the default in Settings → System → AI or pick it in the card's editor.\n\n**Anthropic.** Home Assistant's recommended settings use Claude Haiku 4.5 with thinking on. Turn **Recommended** off and choose:\n\n| Setting | Choose |\n| --- | --- |\n| Model | `claude-haiku-5-5`, newer and about a tenth of Haiku 4.5's price |\n| Maximum tokens | 3000, the default. It's only a ceiling; lower risks a note cut off, and then none |\n| Thinking effort | Low, the least Haiku 5.5 offers |\n| Code execution, web search, web fetch | Off |\n\nOn Haiku 4.5, set **Thinking budget** to 0 instead: anything under 1024 turns thinking off.\n\n**OpenAI.** Home Assistant's recommended model is `gpt-4o-mini`, which OpenAI retires in January 2027. Turn **Recommended** off and choose `gpt-6-luna`, with **Reasoning effort** set to None, and leave web search and the code interpreter off. The image model doesn't matter for the note.\n\n**Other integrations** (Google, Ollama, OpenRouter, Home Assistant Cloud): pick their smallest current model and turn thinking or reasoning down as far as it goes. A local model through Ollama costs nothing per note, but needs to follow a JSON schema: the card asks for structured output.\n\n### A note from an entity\n\nThe card can also show a sentence from any entity whose state is text: a text helper, a template sensor, or a summary sensor from your weather integration, such as Pirate Weather's. An entity is used instead of the AI.\n\n- **The state is the one-line version.** Keep it to about 40 characters, so it fits a phone.\n- **A `note` attribute, if there is one, is the longer version.** The card shows it where there's room for two lines. Keep it to about 90 characters.\n- **A `generated_at` attribute marks when it was written.** The card hides the note 3 hours later (`note_max_age`), so a note about this afternoon's rain isn't still up tonight. The AI's own notes do the same.\n\nWith a note, from either source, the card asks the sections view for five rows. On a phone, that's room for the one-line version. With four, the note gives way.\n\n```yaml\ntype: custom:animated-weather-card\nentity: weather.forecast_home\nsun_entity: sun.sun\nnote_entity: input_text.weather_note\n```\n\n### Just the numbers\n\nThis hides the metric labels and icons, and marks the indoor reading with a house icon instead of the word.\n\n```yaml\ntype: custom:animated-weather-card\nentity: weather.forecast_home\nindoor_temperature_entity: sensor.living_room_temperature\nindoor_style: icon\nshow_attribute_labels: false\nshow_attribute_icons: false\n```\n\n### A calmer card\n\nThis keeps all the weather inside the card, stops the jolt on lightning strikes, and also pauses while the browser window is in the background. For a sky with no motion at all, set `animate: false`.\n\n```yaml\ntype: custom:animated-weather-card\nentity: weather.forecast_home\nspill_particles: false\ndisable_lightning_shake: true\nauto_pause: true\n```\n\n### Your own colours\n\nEach `_bg` colour becomes a full sky for that condition: lighter overhead, deeper at the horizon, with the same shading behind the metrics as the built-in skies. It replaces that condition's sky at every time of day.\n\n```yaml\ntype: custom:animated-weather-card\nentity: weather.forecast_home\ncustom_colors:\n  sunny_bg: \"#2f80d1\"\n  cloudy_bg: \"#6b7a8f\"\n  rainy_bg: \"#3f5168\"\n  text_color: \"#ffffff\"\n  rain_color: \"rgba(220, 235, 255, 0.8)\"\n```\n\n### Skies from your theme\n\nFor full control, set a sky per condition in a [Home Assistant theme](https:\u002F\u002Fwww.home-assistant.io\u002Fintegrations\u002Ffrontend\u002F). Any CSS background works. This covers all fifteen skies, including those `custom_colors` doesn't reach, such as pouring and storms. The variable names are listed under [Conditions](#conditions).\n\n```yaml\n# configuration.yaml → frontend: themes:, or a file in themes\u002F\nmy_theme:\n  weather-sunny-background: \"linear-gradient(180deg, #5aa0e6 0%, #2a6db5 60%, #1d4f87 100%)\"\n  weather-pouring-background: \"linear-gradient(180deg, #4a5566 0%, #2d3542 100%)\"\n  weather-clear-night-background: \"linear-gradient(180deg, #0b1026 0%, #1b2547 100%)\"\n```\n\n### A stormier sky\n\nThe weather engine scales the animation. For the editor's slider ranges and what YAML accepts, see [Weather engine](#weather-engine).\n\n```yaml\ntype: custom:animated-weather-card\nentity: weather.forecast_home\nengine_settings:\n  windSpeed: 3.5\n  rainCount: 2\n  cloudCount: 5\n  cloudBaseSize: 1.3\n  splashBounce: 110\n```\n\n### Day and night by the clock\n\nThis follows fixed hours instead of the sun, for example when your `sun.sun` doesn't match where the dashboard hangs.\n\n```yaml\ntype: custom:animated-weather-card\nentity: weather.forecast_home\nenable_day_night_cycle: true\nsunrise_hour: 7\nsunset_hour: 19\n```\n\n## Options\n\n### Weather card\n\n`type: custom:animated-weather-card`\n\n**Entities**\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `entity` | required | Your weather entity |\n| `name` | entity's name | The location shown above the temperature |\n| `sun_entity` | — | Usually `sun.sun`. Adds the next sunset (by day) or sunrise (by night) to the metric row. The sky follows `sun.sun` with or without it |\n| `outdoor_sensor_entity` | — | A temperature sensor to show instead of the weather entity's temperature |\n| `feels_like_entity` | — | An apparent temperature sensor. Without it, the card uses the weather entity's `apparent_temperature` if it has one |\n| `humidity_sensor_entity` | — | A humidity sensor to show instead of the weather entity's humidity |\n| `pressure_sensor_entity` | — | A pressure sensor to show instead of the weather entity's pressure |\n| `wind_speed_sensor_entity` | — | A wind speed sensor to show instead of the weather entity's wind speed, in its own unit. It also sets how fast the weather moves |\n| `wind_direction_sensor_entity` | — | A wind direction sensor for the wind arrow, in degrees or a compass point like `NW` |\n| `indoor_temperature_entity` | — | An indoor temperature, shown under the condition |\n| `indoor_humidity_entity` | — | An indoor humidity, shown beside it |\n| `flights_entity` | — | A Flightradar24 area sensor, usually `sensor.flightradar24_current_in_area` |\n\n**Display**\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `compact` | `false` | One line about 88 px tall: the temperature and condition, with the location and \"feels like\" beside them. Two rows in the sections view |\n| `temperature_decimals` | `0` | `1` shows the temperature, \"feels like\" and the indoor temperature to one decimal, `21.5°`, in your language's format. `0` rounds them to whole degrees |\n| `show_location` | `true` | Show the location name |\n| `show_attributes` | `true` | Show the metric row: humidity, wind, pressure and sunset |\n| `show_attribute_labels` | `true` | Show the metric labels |\n| `show_attribute_icons` | `true` | Show the metric icons |\n| `show_sun` | `true` | Show the next sunset or sunrise in the metric row. Needs `sun_entity` |\n| `show_indoor` | `true` | Show the indoor reading |\n| `indoor_style` | `label` | How the indoor reading starts: `label` (the word \"Indoors\", translated), `icon` (a house) or `both` |\n| `show_flight_labels` | `true` | Show the flight number and aircraft type beside each plane. Labels only appear in open sky, never over the temperature |\n| `color_palette` | `default` | `default` for the sky, or `theme` for your dashboard's colours |\n\n**Interactions**\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `tap_action` | `more-info` | What a tap on the weather does. Takes Home Assistant's [card actions](https:\u002F\u002Fwww.home-assistant.io\u002Fdashboards\u002Factions\u002F): `more-info`, `navigate`, `url`, `perform-action`, `assist` or `none`. By default it opens the weather entity's details |\n| `hold_action` | `none` | What a press of half a second or more does |\n| `double_tap_action` | `none` | What a double tap does. With it set, a single tap waits a quarter of a second to tell the two apart |\n\n**Weather note**\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `show_note` | `false` | Write a note under the conditions with Home Assistant's AI Task, from the forecast. Needs Home Assistant 2025.8 or later and an AI integration. Five rows in the sections view |\n| `note_tone` | `snarky` | The note's voice: `snarky`, `calm`, `friendly` or `dry`. Serious weather always gets plain advice |\n| `note_ai_task_entity` | the default | The AI Task entity that writes it. Without it, the default from Settings → System → AI |\n| `note_calendar` | — | The calendar your hours out come from, or a list of them, for what to wear. Timed events count; all-day, cancelled and online ones don't. Only the times reach the AI |\n| `note_entity` | — | Show a note from an entity instead of the AI: a text helper, a template sensor or a summary sensor. Its state is the one-line version |\n| `note_attribute` | `note` | The entity's attribute with a longer version, shown where there's room for two lines |\n| `note_max_age` | `180` | Minutes after a note was written (an entity's `generated_at` attribute) that it's hidden. `0` keeps it up. An entity note without `generated_at` stays until the entity changes it |\n\n**Motion**\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `animate` | `true` | Set to `false` for a still sky: the condition's colour and light, no motion |\n| `spill_particles` | `true` | Let rain, snow, sleet and leaves fall out of the card onto the dashboard, and clouds drift a little above its top edge. Turn it off to keep all weather inside the card |\n| `disable_lightning_shake` | `false` | Turn off the card's small jolt on lightning strikes |\n| `auto_pause` | `false` | Also pause while the browser window is in the background. Cards always pause while the tab is hidden or the card is off-screen |\n| `dev_mode` | `false` | A developer panel with sample data for trying every condition. Needs `animated-weather-card-dev.js` |\n\n**Day and night**\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `enable_day_night_cycle` | `false` | Follow the clock instead of the sun |\n| `sunrise_hour` | `6` | The hour the day begins, 0–23 |\n| `sunset_hour` | `20` | The hour the night begins, 0–23 |\n\n#### Weather engine\n\nSet these under `engine_settings:`. The editor's sliders cover the useful range, and YAML accepts more. Values outside the YAML range fall back to the default.\n\n| Option | Default | Editor | YAML | Description |\n| --- | --- | --- | --- | --- |\n| `windSpeed` | `2` | 0.5–5 | 0.1–15 | How strongly the live wind speed drives the motion |\n| `rainCount` | `1` | 0.5–3× | 0.1–10× | Amount of rain |\n| `snowCount` | `1` | 0.5–3× | 0.1–10× | Amount of snow |\n| `leafCount` | `1` | 0.5–3× | 0.1–10× | Amount of leaves on windy days |\n| `cloudCount` | `3` | 1–6 | 1–20 | Number of clouds |\n| `cloudBaseSize` | `1` | 0.5–2× | 0.3–2.5× | Cloud size |\n| `splashBounce` | `80` | 40–120 | 40–120 | How high raindrops spring back after they splash |\n\n#### Custom colours\n\nSet these under `custom_colors:`. Leave one out to keep the built-in colour.\n\n| Option | Accepts | Description |\n| --- | --- | --- |\n| `sunny_bg`, `cloudy_bg`, `rainy_bg`, `stormy_bg`, `snowy_bg`, `windy_bg` | Hex | Replaces that condition's sky with one built from this colour. It applies to that condition only: `rainy_bg` leaves pouring rain alone. Colorized palette only |\n| `text_color` | Hex, `rgb()`, `rgba()` or a colour name | All text on the card |\n| `sun_color` | Same | The sun |\n| `rain_color` | Same | Raindrops |\n| `snow_color` | Same | Snowflakes |\n\n### Sun tracker card\n\n`type: custom:animated-sun-tracker-card`\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `sun_entity` | required | Usually `sun.sun` |\n| `moon_entity` | — | A moon phase sensor, such as the Moon integration's `sensor.moon_phase` |\n| `weather_entity` | — | Share this weather entity's sky: its condition at the current time of day. Without it, the sky is clear |\n| `compact` | `false` | One line about 110 px tall: the next sunrise or sunset beside the sun's path. Two rows in the sections view |\n| `title` | — | A title above the headline |\n| `show_header` | `true` | Show the next sunrise or sunset and the time until it |\n| `show_details` | `true` | Show first and last light, solar noon, daylight and the moon phase |\n| `color_palette` | `default` | `default` for the sky, or `theme` for your dashboard's colours |\n| `tap_action` | `more-info` | What a tap does. By default it opens the sun entity's details. Takes the same actions as the weather card |\n| `hold_action` | `none` | What a press of half a second or more does |\n| `double_tap_action` | `none` | What a double tap does |\n\n`custom_colors` and theme skies apply to the weather card only.\n\n## Conditions\n\nThe card reads the standard Home Assistant conditions. It also understands free-text conditions from other integrations, such as \"light rain\", \"thunderstorm\", \"mist\" or \"heavy snow\", and picks the closest sky.\n\n| Home Assistant condition | What you see | Theme variable |\n| --- | --- | --- |\n| `sunny` | Clear sky and the sun | `weather-sunny-background` |\n| `clear-night` | Stars and the moon | `weather-clear-night-background` |\n| `partlycloudy` | The sun between drifting clouds | `weather-partly-cloudy-background` |\n| `cloudy` | Overcast, with drifting clouds | `weather-cloudy-background` |\n| `fog` | Drifting fog | `weather-foggy-background` |\n| `rainy` | Rain that splashes on the lower edge | `weather-rainy-background` |\n| `pouring` | Heavy rain | `weather-pouring-background` |\n| `lightning`, `lightning-rainy` | Storm rain and lightning | `weather-stormy-background` |\n| `snowy` | Snow drifting with the wind | `weather-snowy-background` |\n| `snowy-rainy` | Snow and rain together | `weather-snowy-rainy-background` |\n| `hail` | Sleet | `weather-sleety-background` |\n| `windy`, `windy-variant` | Leaves on the wind | `weather-windy-background` |\n| `exceptional` | A clear sky | `weather-sunny-background` |\n\nFree-text conditions can also reach these skies:\n\n| Free text | Sky | Theme variable |\n| --- | --- | --- |\n| \"light rain\", \"light drizzle\" | Light rain | `weather-light-rain-background` |\n| \"sleet\" | Sleet | `weather-sleety-background` |\n| Snow with thunder | Snow and lightning | `weather-snowy-stormy-background` |\n| Sleet with thunder | Sleet and lightning | `weather-sleety-stormy-background` |\n\n## Languages\n\nBoth cards follow your Home Assistant profile: its language and its 12\u002F24-hour time format.\n\n- **From Home Assistant:** the weather condition, the moon phase, and the humidity, wind and pressure labels come from Home Assistant's own translations.\n- **The cards' own words:** \"Feels like\", \"Indoors\", sunrise and sunset, and the sun tracker's labels are translated into:\n  - English\n  - German\n  - Spanish\n  - French\n  - Italian\n  - Dutch\n  - Polish\n  - Portuguese\n  - Romanian\n\nOther languages show English for those words. The strings live in [`src\u002Flocalize.ts`](src\u002Flocalize.ts), and corrections and new languages are welcome.\n\n## Troubleshooting\n\n**\"Custom element doesn't exist: animated-weather-card\"**\nThe resource isn't loaded. Check **Settings → Dashboards → Resources**, then reload the page. In the Companion app, reset the frontend cache from the app's settings.\n\n**Still the old version after an update**\nYour browser is using a cached copy. For a manual install, raise the `?v=` number in the resource URL. In both cases, reload the page.\n\n**\"name has already been used\" in the browser console**\nThe card is loaded twice, usually from both `\u002Fhacsfiles\u002F` and `\u002Flocal\u002F`. Remove one of the resources.\n\n**The sky shows, but nothing moves**\nCheck these, in order:\n\n1. Reduced motion is on in your system settings.\n2. `animate` is `false`.\n\n**The settings panel stays empty**\n`animated-weather-card-editor.js` must be in the same folder as `animated-weather-card.js`.\n\n**No sunset in the metric row**\nAdd `sun_entity: sun.sun`.\n\n**No note under the conditions**\nThe note needs Home Assistant 2025.8 or later and an AI Task: the default one from Settings → System → AI, or `note_ai_task_entity`. The editor's **Weather note** section says what's missing, and so does the browser console. The card only writes while it's on screen, and after a failure it tries again ten minutes later. On a manual install, `animated-weather-card-note.js` has to sit next to `animated-weather-card.js`.\n\n**Planes don't appear**\nPlanes only fly in a few cases:\n\n- Only flights that enter your area after the dashboard loads fly. Flights already overhead stay put, so reloading doesn't replay them.\n- Planes on the ground wait until they take off.\n- Flights that arrive while the card is paused are skipped.\n- At most three planes cross at once.\n- On a manual install, `animated-weather-card-planes.js` has to sit next to `animated-weather-card.js`. The browser console says so if it can't load.\n\nTo check the setup, the developer panel's **Fly a plane** button sends one across in `dev_mode`.\n\n## Contributing\n\nBug reports, ideas, translations and pull requests are all welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md), and see the [changelog](CHANGELOG.md) for what's new.\n\n```bash\nnpm install\nnpm run dev          # rebuild on change\nnpm test             # Vitest suite\nnpm run type-check\nnpm run build        # the five bundles, written to the repository root\n```\n\nTo try a change in Home Assistant, copy the five `.js` files to `config\u002Fwww\u002F` and add `dev_mode: true` to a card. You get sample data and a panel for trying every condition and time of day.\n\n### How it's built\n\n- **Five bundles,** built with esbuild. The card bundle loads the editor, the note writer, the planes and the developer panel from its own folder when they're needed, so most dashboards only download the first.\n- **One animation class per kind of weather,** on a shared lifecycle base and run by an animation controller. Rain, snow and sleet draw from fixed pools of recycled particles.\n- **Skies defined in OKLCH,** with tests for contrast at every point where text sits.\n\n```\nsrc\u002F\n├── animated-weather-card.ts        # The weather card\n├── sun-tracker-card.ts             # The sun tracker card\n├── animated-weather-card-editor.ts # Entry point of the editor bundle\n├── config-editor.ts                # Visual editor for the weather card\n├── sun-tracker-editor.ts           # Visual editor for the sun tracker\n├── animated-weather-card-dev.ts    # Entry point of the developer panel bundle\n├── dev-panel.ts                    # Developer panel (dev_mode)\n├── animated-weather-card-note.ts   # Entry point of the note writer bundle\n├── note-generator.ts               # Writes the note with Home Assistant's AI Task\n├── animation-controller.ts         # Starts and stops animations per condition\n├── modular-integration-bridge.ts   # Builds each animation with its settings\n├── base-animation.ts               # Lifecycle base class for animations\n├── rain-animation.ts, snow-animation.ts, sleet-animation.ts, wind-animation.ts,\n│   lightning-animation.ts, clouds-animation.ts, fog-animation.ts,\n│   stars-animation.ts, sun-animation.ts\n├── animated-weather-card-planes.ts # Entry point of the planes bundle\n├── planes-animation.ts             # Plane fly-overs\n├── aircraft.ts                     # Each aircraft family, drawn from its real dimensions\n├── particle-pool.ts                # Recycled particles for rain, snow and sleet\n├── gsap-effects.ts                 # Clouds, leaves, swooshes and fog\n├── flight-tracker.ts               # Flightradar24 arrivals for plane fly-overs\n├── sky.ts                          # Sky palettes (OKLCH), phases and contrast checks\n├── localize.ts                     # The cards' own strings, times and durations\n├── time-manager.ts                 # Optional clock-based day\u002Fnight cycle\n├── weather-data.ts                 # Reads the weather entity and sensors\n├── color-utils.ts                  # custom_colors\n├── constants.ts, types.ts, utils.ts\n└── styles\u002F                         # CSS for the card, editor and developer panel\n```\n\n## Credits\n\n- [GSAP](https:\u002F\u002Fgsap.com) moves the weather. It's bundled into the card under its [standard license](https:\u002F\u002Fgsap.com\u002Fstandard-license).\n- [Material Design Icons](https:\u002F\u002Fpictogrammers.com\u002Flibrary\u002Fmdi\u002F), through Home Assistant, draw the metric icons.\n- The [Flightradar24 integration](https:\u002F\u002Fgithub.com\u002FAlexandrErohin\u002Fhome-assistant-flightradar24) by AlexandrErohin supplies the planes.\n- The Home Assistant community gave feedback along the way. Thank you.\n\n## License\n\n[MIT](LICENSE)\n\n## Support\n\nIf the card earns its place on your dashboard, you can buy me a coffee.\n\n[![ko-fi](https:\u002F\u002Fko-fi.com\u002Fimg\u002Fgithubbutton_sm.svg)](https:\u002F\u002Fko-fi.com\u002FY8Y1124U41)\n","这是一款为 Home Assistant 设计的动态天气信息卡片，将静态天气数据转化为具有实时动画效果的可视化天空界面。核心功能包括：基于天气状态（雨、雪、雾、雷暴等）和时间（日出\u002F正午\u002F日落\u002F夜间）驱动的自适应天空动画；集成 Home Assistant 内置 sun.sun 实体实现真实日照轨迹追踪；支持启用 AI 生成简明天气提示（需 HA 2025.8+ 及 AI Task）。采用 TypeScript 开发，兼容 Lovelace 界面，通过 HACS 安装。适用于智能家居中控面板、家庭气象看板等注重视觉表现与实用性的本地化家居自动化场景。",2,"2026-11-24 04:37:58","CREATED_QUERY"]