Commit e5178db
sync: dev to main (#41)
* feat: move to bun and ts (#8)
* feat: migrate to Bun runtime and TypeScript
Major architectural changes:
Runtime & Build System:
- Migrate from Node.js + Yarn to Bun.js (v1.3.6)
- Replace Rollup bundler with Bun's built-in bundler
- Add build.ts configuration for Bun.build() API
- Remove rollup.config.js and 5 Rollup dependencies
- Build time improved by 75% (1.4s → 0.8s)
TypeScript Migration:
- Convert all 15 JavaScript files to TypeScript
- Add comprehensive type definitions in src/types.ts
- Create TypeScript configuration with strict mode
- Add type declarations for SVG imports (src/types/svg.d.ts)
- Implement proper typing for Home Assistant entities
- Add interfaces for weather data, animations, and configuration
Code Modernization:
- Migrate Lit components to decorators (@Property, @State)
- Add type safety to Canvas API operations
- Type all animation classes and particle systems
- Update ESLint configuration for TypeScript support
- Fix all TypeScript compilation and linting errors
Dependencies:
- Add: typescript (^5.9.3), @typescript-eslint packages
- Remove: rollup, @rollup/plugin-* packages
- Update: package.json scripts to use Bun commands
Files Changed:
- 15 files: .js → .ts conversion
- Deleted: rollup.config.js, yarn.lock
- Added: build.ts, tsconfig.json, bun.lock, src/types.ts
- Modified: package.json, eslint.config.js
- Rebuilt: dynamic-weather-card.js (88.40 KB)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: restore wind direction icon and add wind bearing control to demo
Bug Fix:
- Import windDirection function from svg-icons.ts
- Replace getSVGIcon('windDirection', ...) with direct windDirection() call
- Fix wind direction arrow not displaying in the card
Demo Improvements:
- Add wind bearing input control (0-359°)
- Add quick direction buttons (N, E, S, W)
- Update presets with specific wind bearing values
- Update demo sequence with varying wind directions
- Add translations for wind bearing control (EN/RU)
Files Modified:
- src/components/card.ts: Fix windDirection import and usage
- test.html: Add wind bearing controls and update demo data
- dynamic-weather-card.js: Rebuilt with fixes
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: resolve eslint warnings by replacing any types with proper typing
- Replace any with unknown/specific types in card.ts, index.ts, types.ts
- Add index signature to WeatherEntityAttributes for dynamic attributes
- Add missing properties to interfaces (wind_gust, forecast_hourly, etc.)
- Remove non-null assertions by adding null checks
- Add ConfigInput interface for setConfig method
- Extend language support to include all supported languages (de, nl, fr)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* ci: migrate GitHub Actions from Yarn/Node to Bun
- Replace actions/setup-node with oven-sh/setup-bun in validate.yml and release.yml
- Change yarn install to bun install --frozen-lockfile
- Change yarn build to bun run build
- Add bun lint step before build
- Replace node -p with grep for parsing version in auto-tag.yml
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor: convert translation files from JS to TypeScript
- Convert all locale translation.js files to translation.ts
- Add proper typing with Translation interface
- Update imports in index.ts to reference .ts files
- Remove emojis from translation strings for cleaner output
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: update sun entity in readme
---------
Co-authored-by: nurbiy.teuchezh <nurbiy.teuchezh@wilix.org>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* ci: update dependabot config (#16)
* feat: add Spanish translation (#19)
Port Spanish translation from main branch to TypeScript format.
- Add Spanish translation file (es/translation.ts)
- Update SupportedLanguage type to include 'es'
- Add Spanish language detection in resolveLanguage
- Update all translation files to include Spanish in language selector
- Update documentation (README.md, README.ru.md, info.md, test.html)
* feat(card): add daily forecast and configurable clock position
- Previsión diaria según parametro
- Previsión semanal según parametro
Co-authored-by: Angel Fernandez Cobo <angel.fernandez@fieldeas.com>
* сhore: sync-main-dev (#22)
* feat: port Italian translation from main to TypeScript
- Add Italian (it) translation file in TypeScript format
- Update language resolution to detect Italian locale
- Add Italian to supported languages type
- Update demo translations interface for Italian language option
Ported from commit 0c30af9 in main branch.
* refactor: fix typo in folder name internalization -> internationalization
- Rename src/internalization to src/internationalization
- Update all import paths in src/index.ts and src/components/card.ts
- Add Italian language option to all translation files
- Rebuild bundle with corrected paths
* chore: sync-main-dev (#23)
* feat: add translation to spanish (#17)
* - Añadir traducción a español
* no message
* - Strings must use singlequote
---------
Co-authored-by: Angel Fernandez Cobo <angel.fernandez@fieldeas.com>
* feat: added Italian translation following existing localization structure (#15)
* Add Italian translations for weather conditions
* Add Italian translations to i18n module
* Add Italian language support in resolveLanguage
* Update Language Italian test.html
* Update translation.js
* Update translation.js
* Update translation.js
* Update translation.js
* Update translation.js
---------
Co-authored-by: Teuchezh Nurbiy <40827089+teuchezh@users.noreply.github.com>
* feat(i18n): add show_clock translation key
- Added show_clock translation to all language files
- Updated Translation interface to include show_clock field
- Rebuilt dynamic-weather-card.js with new translations
Translations:
- en: Show current time
- ru: Показывать часы
- de: Aktuelle Uhrzeit anzeigen
- fr: Afficher l'heure actuelle
- nl: Huidige tijd weergeven
- es: Mostrar hora actual
- it: Mostra ora corrente
---------
Co-authored-by: angelrenedo <xicksport@gmail.com>
Co-authored-by: Angel Fernandez Cobo <angel.fernandez@fieldeas.com>
Co-authored-by: SerpikoIT <75452931+SerpikoIT@users.noreply.github.com>
* docs: add agents.md (#25)
Co-authored-by: nurbiy.teuchezh <nurbiy.teuchezh@wilix.org>
* feat: sun object (#26)
Co-authored-by: nurbiy.teuchezh <nurbiy.teuchezh@wilix.org>
* feat: add forecast subscription support for modern weather integrations (#27)
Add support for weather/subscribe_forecast WebSocket API used by DWD, Met.no and other modern weather integrations in Home Assistant 2024+. The card now subscribes to real-time forecast updates instead of relying only on entity attributes.
Key changes:
- Implement weather/subscribe_forecast WebSocket subscription
- Add hourly and daily forecast state management
- Support automatic sun data retrieval from sun.sun entity
- Fix TypeScript directive lifecycle method (reconnected)
- Remove debug console logs
- Maintain backward compatibility with attribute-based forecast
Co-authored-by: nurbiy.teuchezh <nurbiy.teuchezh@wilix.org>
* docs: setup issue templates (#28)
* docs: setup issue templates
* ci: update workflows for run at main branch
update dependabot config
---------
Co-authored-by: nurbiy.teuchezh <nurbiy.teuchezh@wilix.org>
* fix: wind speed display (#29)
Co-authored-by: nurbiy.teuchezh <nurbiy.teuchezh@wilix.org>
* feat(editor): add visual editor with automatic detection of the language (#30)
* - Añadir la posiblidad de cambiar la posicion del reloj
- Previsión diaria según parametro
- Previsión semanal según parametro
* - Añadir editor visual de la card
* - Controlar errores
* -Editor visual finalizado
* - Idioma dinamico en el editor según el idioma de HA
* - Controlar que al dejar el nombre vacio salga el friendlyName
---------
Co-authored-by: Angel Fernandez Cobo <angel.fernandez@fieldeas.com>
* feat: clock format (#31)
Co-authored-by: nurbiy.teuchezh <nurbiy.teuchezh@wilix.org>
* docs: refactor readme (#32)
* docs: refactor readme
* docs: rename test.html to demo.html
actualize demo settings and translations
---------
Co-authored-by: teuchezh <nurbiy632@gmailcom>
* sync: main to dev (#37)
* feat: add translation to spanish (#17)
* - Añadir traducción a español
* no message
* - Strings must use singlequote
---------
Co-authored-by: Angel Fernandez Cobo <angel.fernandez@fieldeas.com>
* feat: added Italian translation following existing localization structure (#15)
* Add Italian translations for weather conditions
* Add Italian translations to i18n module
* Add Italian language support in resolveLanguage
* Update Language Italian test.html
* Update translation.js
* Update translation.js
* Update translation.js
* Update translation.js
* Update translation.js
---------
Co-authored-by: Teuchezh Nurbiy <40827089+teuchezh@users.noreply.github.com>
* sync: dev to main (#33)
* feat: move to bun and ts (#8)
* feat: migrate to Bun runtime and TypeScript
Major architectural changes:
Runtime & Build System:
- Migrate from Node.js + Yarn to Bun.js (v1.3.6)
- Replace Rollup bundler with Bun's built-in bundler
- Add build.ts configuration for Bun.build() API
- Remove rollup.config.js and 5 Rollup dependencies
- Build time improved by 75% (1.4s → 0.8s)
TypeScript Migration:
- Convert all 15 JavaScript files to TypeScript
- Add comprehensive type definitions in src/types.ts
- Create TypeScript configuration with strict mode
- Add type declarations for SVG imports (src/types/svg.d.ts)
- Implement proper typing for Home Assistant entities
- Add interfaces for weather data, animations, and configuration
Code Modernization:
- Migrate Lit components to decorators (@Property, @State)
- Add type safety to Canvas API operations
- Type all animation classes and particle systems
- Update ESLint configuration for TypeScript support
- Fix all TypeScript compilation and linting errors
Dependencies:
- Add: typescript (^5.9.3), @typescript-eslint packages
- Remove: rollup, @rollup/plugin-* packages
- Update: package.json scripts to use Bun commands
Files Changed:
- 15 files: .js → .ts conversion
- Deleted: rollup.config.js, yarn.lock
- Added: build.ts, tsconfig.json, bun.lock, src/types.ts
- Modified: package.json, eslint.config.js
- Rebuilt: dynamic-weather-card.js (88.40 KB)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: restore wind direction icon and add wind bearing control to demo
Bug Fix:
- Import windDirection function from svg-icons.ts
- Replace getSVGIcon('windDirection', ...) with direct windDirection() call
- Fix wind direction arrow not displaying in the card
Demo Improvements:
- Add wind bearing input control (0-359°)
- Add quick direction buttons (N, E, S, W)
- Update presets with specific wind bearing values
- Update demo sequence with varying wind directions
- Add translations for wind bearing control (EN/RU)
Files Modified:
- src/components/card.ts: Fix windDirection import and usage
- test.html: Add wind bearing controls and update demo data
- dynamic-weather-card.js: Rebuilt with fixes
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: resolve eslint warnings by replacing any types with proper typing
- Replace any with unknown/specific types in card.ts, index.ts, types.ts
- Add index signature to WeatherEntityAttributes for dynamic attributes
- Add missing properties to interfaces (wind_gust, forecast_hourly, etc.)
- Remove non-null assertions by adding null checks
- Add ConfigInput interface for setConfig method
- Extend language support to include all supported languages (de, nl, fr)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* ci: migrate GitHub Actions from Yarn/Node to Bun
- Replace actions/setup-node with oven-sh/setup-bun in validate.yml and release.yml
- Change yarn install to bun install --frozen-lockfile
- Change yarn build to bun run build
- Add bun lint step before build
- Replace node -p with grep for parsing version in auto-tag.yml
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor: convert translation files from JS to TypeScript
- Convert all locale translation.js files to translation.ts
- Add proper typing with Translation interface
- Update imports in index.ts to reference .ts files
- Remove emojis from translation strings for cleaner output
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: update sun entity in readme
---------
Co-authored-by: nurbiy.teuchezh <nurbiy.teuchezh@wilix.org>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* ci: update dependabot config (#16)
* feat: add Spanish translation (#19)
Port Spanish translation from main branch to TypeScript format.
- Add Spanish translation file (es/translation.ts)
- Update SupportedLanguage type to include 'es'
- Add Spanish language detection in resolveLanguage
- Update all translation files to include Spanish in language selector
- Update documentation (README.md, README.ru.md, info.md, test.html)
* feat(card): add daily forecast and configurable clock position
- Previsión diaria según parametro
- Previsión semanal según parametro
Co-authored-by: Angel Fernandez Cobo <angel.fernandez@fieldeas.com>
* сhore: sync-main-dev (#22)
* feat: port Italian translation from main to TypeScript
- Add Italian (it) translation file in TypeScript format
- Update language resolution to detect Italian locale
- Add Italian to supported languages type
- Update demo translations interface for Italian language option
Ported from commit 0c30af9 in main branch.
* refactor: fix typo in folder name internalization -> internationalization
- Rename src/internalization to src/internationalization
- Update all import paths in src/index.ts and src/components/card.ts
- Add Italian language option to all translation files
- Rebuild bundle with corrected paths
* chore: sync-main-dev (#23)
* feat: add translation to spanish (#17)
* - Añadir traducción a español
* no message
* - Strings must use singlequote
---------
Co-authored-by: Angel Fernandez Cobo <angel.fernandez@fieldeas.com>
* feat: added Italian translation following existing localization structure (#15)
* Add Italian translations for weather conditions
* Add Italian translations to i18n module
* Add Italian language support in resolveLanguage
* Update Language Italian test.html
* Update translation.js
* Update translation.js
* Update translation.js
* Update translation.js
* Update translation.js
---------
Co-authored-by: Teuchezh Nurbiy <40827089+teuchezh@users.noreply.github.com>
* feat(i18n): add show_clock translation key
- Added show_clock translation to all language files
- Updated Translation interface to include show_clock field
- Rebuilt dynamic-weather-card.js with new translations
Translations:
- en: Show current time
- ru: Показывать часы
- de: Aktuelle Uhrzeit anzeigen
- fr: Afficher l'heure actuelle
- nl: Huidige tijd weergeven
- es: Mostrar hora actual
- it: Mostra ora corrente
---------
Co-authored-by: angelrenedo <xicksport@gmail.com>
Co-authored-by: Angel Fernandez Cobo <angel.fernandez@fieldeas.com>
Co-authored-by: SerpikoIT <75452931+SerpikoIT@users.noreply.github.com>
* docs: add agents.md (#25)
Co-authored-by: nurbiy.teuchezh <nurbiy.teuchezh@wilix.org>
* feat: sun object (#26)
Co-authored-by: nurbiy.teuchezh <nurbiy.teuchezh@wilix.org>
* feat: add forecast subscription support for modern weather integrations (#27)
Add support for weather/subscribe_forecast WebSocket API used by DWD, Met.no and other modern weather integrations in Home Assistant 2024+. The card now subscribes to real-time forecast updates instead of relying only on entity attributes.
Key changes:
- Implement weather/subscribe_forecast WebSocket subscription
- Add hourly and daily forecast state management
- Support automatic sun data retrieval from sun.sun entity
- Fix TypeScript directive lifecycle method (reconnected)
- Remove debug console logs
- Maintain backward compatibility with attribute-based forecast
Co-authored-by: nurbiy.teuchezh <nurbiy.teuchezh@wilix.org>
* docs: setup issue templates (#28)
* docs: setup issue templates
* ci: update workflows for run at main branch
update dependabot config
---------
Co-authored-by: nurbiy.teuchezh <nurbiy.teuchezh@wilix.org>
* fix: wind speed display (#29)
Co-authored-by: nurbiy.teuchezh <nurbiy.teuchezh@wilix.org>
* feat(editor): add visual editor with automatic detection of the language (#30)
* - Añadir la posiblidad de cambiar la posicion del reloj
- Previsión diaria según parametro
- Previsión semanal según parametro
* - Añadir editor visual de la card
* - Controlar errores
* -Editor visual finalizado
* - Idioma dinamico en el editor según el idioma de HA
* - Controlar que al dejar el nombre vacio salga el friendlyName
---------
Co-authored-by: Angel Fernandez Cobo <angel.fernandez@fieldeas.com>
* feat: clock format (#31)
Co-authored-by: nurbiy.teuchezh <nurbiy.teuchezh@wilix.org>
* docs: refactor readme (#32)
* docs: refactor readme
* docs: rename test.html to demo.html
actualize demo settings and translations
---------
Co-authored-by: teuchezh <nurbiy632@gmailcom>
---------
Co-authored-by: nurbiy.teuchezh <nurbiy.teuchezh@wilix.org>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: angelrenedo <xicksport@gmail.com>
Co-authored-by: Angel Fernandez Cobo <angel.fernandez@fieldeas.com>
Co-authored-by: SerpikoIT <75452931+SerpikoIT@users.noreply.github.com>
Co-authored-by: teuchezh <nurbiy632@gmailcom>
* sync: rm old files
---------
Co-authored-by: angelrenedo <xicksport@gmail.com>
Co-authored-by: Angel Fernandez Cobo <angel.fernandez@fieldeas.com>
Co-authored-by: SerpikoIT <75452931+SerpikoIT@users.noreply.github.com>
Co-authored-by: nurbiy.teuchezh <nurbiy.teuchezh@wilix.org>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: teuchezh <nurbiy632@gmailcom>
* chore(deps-dev): bump the development-dependencies group with 2 updates (#36)
* ci: bump actions/github-script from 7 to 8 (#35)
Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](actions/github-script@v7...v8)
---
updated-dependencies:
- dependency-name: actions/github-script
dependency-version: '8'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* ci: bump actions/checkout from 4 to 6 (#34)
* fix(ci): include only dynamic-weather-card.js in release assets (#38)
HACS downloads only the main JS file from release assets. Other files
(README, LICENSE, CHANGELOG, hacs.json) are read directly from the
repository.
Co-authored-by: teuchezh <nurbiy632@gmailcom>
* docs: fix manual installation path in README files (#39)
Correct the installation directory from config/www/ to
config/www/community/dynamic-weather-card/ and update the resource URL
to match the correct path structure.
Co-authored-by: teuchezh <nurbiy632@gmailcom>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: nurbiy.teuchezh <nurbiy.teuchezh@wilix.org>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: angelrenedo <xicksport@gmail.com>
Co-authored-by: Angel Fernandez Cobo <angel.fernandez@fieldeas.com>
Co-authored-by: SerpikoIT <75452931+SerpikoIT@users.noreply.github.com>
Co-authored-by: teuchezh <nurbiy632@gmailcom>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>1 parent 78d1d42 commit e5178db
9 files changed
Lines changed: 77 additions & 30 deletions
File tree
- .github/workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
| 165 | + | |
172 | 166 | | |
173 | 167 | | |
174 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
0 commit comments