mirror of
https://github.com/home-assistant/frontend.git
synced 2026-02-15 07:25:54 +00:00
fcf844cf1a76cbdac7477baebc2905dd252d9111
Summary of the fix: The Problem: now-12m was selecting the calendar year (Jan 1st to Dec 31st) instead of the last 12 months from now It used startOfMonth and endOfMonth, which snap to month boundaries The Solution: Changed to match the now-7d and now-30d pattern Now uses subMonths(today, 12) for start and subMonths(today, 0) (which equals today) for end This gives exactly the last 12 months (365/366 days) ending at the current time The Fix: // Before (WRONG):calcDate(subMonths(today, 12), startOfMonth, ...) // Jan 1st of 12 months agocalcDate(subMonths(today, 1), endOfMonth, ...) // Dec 31st of last month// After (CORRECT):calcDate(today, subMonths, hass.locale, hass.config, 12) // 12 months ago from nowcalcDate(today, subMonths, hass.locale, hass.config, 0) // now
…
…
Home Assistant Frontend
This is the repository for the official Home Assistant frontend.
Development
- Initial setup:
script/setup - Development: Instructions
- Production build:
script/build_frontend - Gallery:
cd gallery && script/develop_gallery - Supervisor: Instructions
Frontend development
Classic environment
A complete guide can be found at the following link. It describes a short guide for the build of project.
License
Home Assistant is open-source and Apache 2 licensed. Feel free to browse the repository, learn and reuse parts in your own projects.
We use BrowserStack to test Home Assistant on a large variety of devices.
Description
Languages
TypeScript
98.8%
JavaScript
1.1%

