Commit Graph
167 Commits
Author SHA1 Message Date
DigiLive db3a00d6f2 Optimize Chips
- Make use of the debug module.
- Make use of the Registry module.
- Align code across the chip modules.
- Make configurations immutable.
- Make use of the refactored types.
2025-05-13 12:08:30 +02:00
DigiLive 3c8a236961 Fix translation files
- Align the translation keys across the files.
- Fix typos.
2025-05-13 12:08:19 +02:00
DigiLive 3725b89f9e Add Registry class.
The class is an optimized version of the Helper class.

- Sanitization of the HASS registries after import according to the
  configuration options.
- Improved error handling and logging.
- Removed generic utility functions.
2025-05-13 12:08:13 +02:00
DigiLive d224fc353c Refactor ConfigurationDefaults
Making use of the global localization functions, ConfigurationDefaults
is now a constant value instead of a function.
2025-05-13 12:08:10 +02:00
DigiLive e94ce9c830 Refactor Controller Card
The card is renamed to Header Card because it's clearer regarding its
purpose.
2025-05-13 12:08:08 +02:00
DigiLive 500a221638 Add modules
- debug module for centralized logging and debug level management.
- localize module for localization functions in the global scope.
- RegistryFilter module for advanced filtering and sorting of HASS
  registries.
- auxiliaries module for genric utility functions.
2025-05-13 12:08:03 +02:00
DigiLive b068486aeb Refactor types and interfaces.
- Update third party types and interfaces to their latest versions.
- Strategy types and interface removed from namespace and split into
  separate files.
- Update Strategy types, interfaces and typeguards to be more
  restrictive and concise.
- Add missing docblocks.
2025-05-13 12:07:57 +02:00
DigiLive f3a59fb8d3 Refactor tool configurations 2025-05-13 12:07:50 +02:00
DigiLive 40c2fe302c Add dependencies
Installed the new packages and versions of `package.json`.
2025-05-13 12:07:47 +02:00
DigiLive 36bf5f4e41 Add Prettier dependency 2025-05-13 12:07:47 +02:00
DigiLive cd4eb0e12b Bump dependency versions 2025-05-13 12:07:47 +02:00
DigiLive 1adcd06bd7 Add ESlint dependencies 2025-05-13 12:07:46 +02:00
DigiLive da936e9c3d Fix typos and grammar 2025-05-13 12:07:42 +02:00
DigiLive 3b30cd951b Bump Strategy version 2025-05-13 12:07:37 +02:00
DigiLive a852347cc4 Fix typo in JSDOC 2025-05-13 12:07:34 +02:00
DigiLive eb91a672a9 Make Style rules
Not all styling rules where included or correctly set.
2025-05-13 12:07:26 +02:00
DigiLive b3ca5f94f9 Optimize types
The type definitions and interfaces of Home Assistant and Mushroom where
outdated. Also, the type definitions and interfaces of the strategy
could use some refinement.
2025-05-13 12:07:05 +02:00
DigiLive d28ea4c52e Build Distribution v2.3.0 2025-05-13 07:59:18 +02:00
DigiLive 1aa2bb0d3a Cut dist directory from gitignore
Git evaluates this folder after the build process to detect if a
new commit to the repository is required.
2025-05-13 07:43:02 +02:00
Ferry Cools a5ec18823d Release v2.3.0 (#195)
Adds:

- Strategy:
  - SceneCard: Support for Stateful scenes. Closes #190.
  - ValveCard: A card to control an entity of the valve domain. Closes #192.
  - LockView: A view for entities of the lock domain. Closes #171.
- Modules:
  - RegistryFilter: Advanced filtering and sorting of Home Assistant registries.
  - Auxiliaries: Generic utility functions.
  - Debug: Centralized logging and debug level management.
- Tooling:
  - ESLint configuration for linting.
  - Prettier configuration for code formatting.


Removes:

- Redundant types and interface annotations.
- Redundant legacy and unused modules.
- Localization constant from the `Helper` module in favor of a new `localize` utility.

Refactors:

- References regarding change of repository owner.
- Auxiliary functions are moved from the `Helper` module to `Auxiliaries` module.
- `Helper` module is renamed to `Registry` for centralized state and registry management.
- `ControllerCard` is renamed to `HeaderCard`.
- Doc-blocks and comments are updated for clarity and consistency.
- The file tree is restructured for improved clarity, modularity, and scalability.
- Third party type definitions are updated and cleaned up.
- Issue and Pull Request templates.

Optimizations:

- Parallelization of dynamic imports for views and cards.
- Improved error handling and logging throughout the codebase.
- Sanitization of HASS registries after import.
- Enforced stricter and simplified types and interfaces.
- Localization now available at global scope.

Fixes:

- Wrong type in configuration of `HeaderCard`.
- Translation files: Resolved key inconsistencies.
- Removed unnecessary namespaces from types.
- Typos and Grammar.
- Explicit use of `any` types.
- Turn off all entities of a domain with a chip tap action.
- Rendering too small HASS area cards.
- Count of active vacuums.


Bumps:

- Mushroom Strategy
- home-assistant-js-websocket
- superstruct
- ts-loader
- ts-node
- typescript
- webpack
- webpack-cli
2025-05-13 07:01:26 +02:00
DigiLive 1bfda2ca22 Refactor repository references 2025-04-26 09:04:33 +02:00
Continuous Integration 0a510648e0 Continuous Integration - Build Distribution 2025-03-23 06:33:22 +00:00
w531t4 711140d13f Add hiding diagnostic entities (#153)
Config and diagnostic entities are now hidden by default.

Their visibility can be defined in the configuration with entries
`hide_config_entities` and `hide_diagnostic_entities` for all or individual domains.
2025-03-23 07:33:00 +01:00
Aalian Khan 0c2649e08e Add additional card image 2025-03-08 08:59:01 -08:00
Aalian Khan e8e0b0c5f1 Add additional card image 2025-03-08 08:39:35 -08:00
Continuous Integration 03b56a5fea Continuous Integration - Build Distribution v2.2.0 2025-03-08 07:29:27 +00:00
Marcoske23andFerry Cools bee8f4b236 Add Spanish translation (#179)
Co-authored-by: Ferry Cools <fcools@digilive.nl>
2025-03-08 08:29:07 +01:00
Continuous Integration 991c913147 Continuous Integration - Build Distribution 2025-03-08 07:26:32 +00:00
Marc d91c8e3159 Add German translation (#176) 2025-03-08 08:26:12 +01:00
Continuous Integration 7dda3c1a38 Continuous Integration - Build Distribution 2025-03-08 07:25:36 +00:00
w531t4andDigiLive d1456426de Add scene domain and associated tap-action (#164)
Scenes are added as a domain so they're available at the top navigation 
bar.
The view doesn't have controller cards since switching multiple scenes 
at once makes no sense.

---------

Co-authored-by: DigiLive <github@digilive.nl>
2025-03-08 08:25:17 +01:00
Continuous Integration c6d475e41f Continuous Integration - Build Distribution 2025-02-09 05:52:44 +00:00
Marc 7f4a6bce89 Fix faulty translation key for covers 2025-02-09 06:52:26 +01:00
Continuous Integration 99d3a3ca31 Continuous Integration - Build Distribution 2025-02-09 05:48:57 +00:00
w531t4 da7d0cd57c Fix counting of hidden entities and devices
Evaluation an entity's hidden property in the strategy options, is now
included in Helper.#areaFilterCallback().
2025-02-09 06:48:38 +01:00
Ferry Cools 9ed17d9a56 Create PULL_REQUEST_TEMPLATE.md
A template for creating pull request which provide better details.
2024-12-18 21:26:49 +01:00
Continuous Integration fffd244370 Continuous Integration - Build Distribution 2024-12-13 06:29:37 +00:00
Ferry Cools ebfd034e20 Fix counting entity states
* Add state filters to getCountTemplate()  
States `unavailable` and `unknown` are now excluded from the return
value of `getCountTemplate()`, since there's no interest in counting
those states. This change affect all entities.

* Add states to unclosed cover count  
Aside from state `open`, the cover-chip and -view, will include state 
`opening` and `closing` to the count of unclosed covers.
2024-12-13 07:29:15 +01:00
Continuous Integration 9041e0b647 Continuous Integration - Build Distribution 2024-12-13 05:56:51 +00:00
Ferry Cools 2cd4512b4f Add localization
Fixed dashboard strings are replaced with a string in the language as
defined by the user.
Currently, languages `en` and `nl` are supported.
If the user-defined language isn't supported, the language will fall
back to english.
Untranslated strings will fall back to the translation keyword.

Resolves #166
2024-12-13 06:56:23 +01:00
Continuous Integration 4b927a7f7b Continuous Integration - Build Distribution 2024-11-29 08:28:08 +00:00
w531t4andDigiLive e927ae6ba5 Add auto import of area icons in home view (#158)
* Changed the default icon for an area.
* Add auto import of area icons in home view (Closes #147).
  The default icon is overwritten at the constructor, if a user-defined icon is set in hass.

---------

Co-authored-by: DigiLive <github@digilive.nl>
2024-11-29 09:27:47 +01:00
Continuous Integration 13c4826f0a Continuous Integration - Build Distribution 2024-11-22 10:50:41 +00:00
w531t4 6f444c5c15 Fix entity card added twice to view (#154)
If not using the area of the entity's device, a card for this entity is 
added for the custom set area, as well as for the area of the entity's 
device.

This change keeps the entity for the custom-set area or else for the 
area of the entity's device.
2024-11-22 11:50:19 +01:00
Continuous Integration 8728dd27f6 Continuous Integration - Build Distribution 2024-11-21 01:06:39 +00:00
Ferry Cools 3bde47d8d7 Bump dependencies (#161)
* Bump webpack version

Versions <5.94.0 are vulnerable to Cross-site Scripting (XSS) via DOM
clobbering in the AutoPublicPathRuntimeModule class.

https://security.snyk.io/package/npm/webpack/5.93.0

* Bump ts-loader version

Versions <9.5.0 have vulnerabilities in their dependencies.

braces: https://github.com/advisories/GHSA-grv7-fg5c-xmjg
cross-spawn: https://github.com/advisories/GHSA-3xgq-45jj-v275
2024-11-20 17:06:18 -08:00
Continuous Integration e10552f326 Continuous Integration - Build Distribution 2024-11-19 02:02:06 +00:00
Aalian Khan d037c31001 bump to 2.2.0 2024-11-18 21:01:43 -05:00
Aalian Khan 09f319a336 Revert "Bump to 2.2.0"
This reverts commit ad8d56374c.
2024-11-18 20:42:56 -05:00
Aalian Khan ad8d56374c Bump to 2.2.0 2024-11-17 21:40:24 -05:00