Commit Graph
53 Commits
Author SHA1 Message Date
DigiLive 02caa4dbed Refactor Codacy items
Adds a code quality badge to the readme and refactors some minor issues
to satisfy Codacy.
2025-05-17 12:35:02 +02:00
DigiLive 28296a8a63 Fix localization for regioned languages 2025-05-17 10:34:29 +02:00
P1LH4 90da717c81 Add Brazilian-Portugese language 2025-05-17 09:51:29 +02:00
DigiLive 6f81e7da65 Fix showing entities twice
Entities with an explicit area id where shown twice.
Once because of the explicit area and once because of its device's area.

Closes #207.
2025-05-16 08:13:44 +02:00
DigiLive 993ef5258a Add a showControls option to all domains
Adds the `showControls` option to the all-domains configuration to allow
hiding the control buttons at a domain view or for the domains at an
area view.

Closes #126.
2025-05-14 10:58:45 +02:00
DigiLive 4cbb1274f6 Fix "Area not found" error
If the card type for the undisclosed area is set to `HaAreaCard`, a card
is shown with the message "Area not found".
This is because it's not a real area and the type must be enforced to
`default`.

Closes #206
2025-05-14 08:36:37 +02:00
DigiLive 2fc0df9db0 Fix Vacuum Control buttons
The default configuration of the control buttons was missing.
2025-05-14 07:37:48 +02:00
DigiLive 207c4c13c0 Bump Strategy version 2025-05-14 07:00:57 +02:00
DigiLive b58ece65cf Fix hiding areas
Closes #205.
2025-05-14 06:41:51 +02:00
DigiLive a4239ca99f Bump Strategy version 2025-05-13 22:34:10 +02:00
DigiLive 101538067e Fix applying custom area configuration
Closes #200, #202.
2025-05-13 22:29:03 +02:00
DigiLive c7b6526326 Fix hiding greeting section
Closes #201.
2025-05-13 21:07:30 +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
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
Marcoske23andFerry Cools bee8f4b236 Add Spanish translation (#179)
Co-authored-by: Ferry Cools <fcools@digilive.nl>
2025-03-08 08:29:07 +01:00
Marc d91c8e3159 Add German translation (#176) 2025-03-08 08:26:12 +01: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
Marc 7f4a6bce89 Fix faulty translation key for covers 2025-02-09 06:52:26 +01: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 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
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
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
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
Aalian Khan d037c31001 bump to 2.2.0 2024-11-18 21:01:43 -05:00
Wallerand Delevacq dbebfc88d3 Support Select/InputSelect mushroom cards (#151)
Add cards

* Select Card.
* Input Select Card

Contribution by wallforfry
2024-10-19 12:27:42 +02:00
Subhash ChandraandDigiLive fba9364106 Add option to hide config-entities (#103).
* Introduces a `hide_config_entities` strategy-option to define if a 
  config-entity should be hidden or not.

* Bumps version number to 2.1.0

---------

Co-authored-by: DigiLive <github@digilive.nl>
2024-02-01 06:57:39 +01:00
Ferry Cools ae744bf177 Fix package version (#124)
The version number has been updated from 2.0.0/2.0.2 to 2.0.3 across
multiple files.
2024-01-28 17:11:26 -08:00
NiekertandFerry Cools e174d06957 Fix views not loading when using card_options (#118)
The logic to check whether an entity is hidden has been changed.

Instead of checking the `entity_id` field which is always undefined, the
updated logic now dynamically references the `entity.entity_id` within 
the card options of the strategy options.

---------

Co-authored-by: Ferry Cools <fcools@digilive.nl>
2024-01-26 12:41:17 +01:00
Ferry Cools 82a91c3bd4 Refactor JavaScript to TypeScript (#81)
Other changes include:

* Add Vacuum Card and View.

* Add hiding a view if no device is configured for it. Closes #24.

* Add icon to HomeView configuration.

* Add version output to console.

* Add version bumper.

* Add .editorconfig settings.

* Refactor README, because the information moved to the repository's
   Wiki. Closes #87.
2023-11-22 21:02:56 +01:00
Julian Schill bf69335a4e Add color temperature button to light card (#93) 2023-11-15 20:34:36 +01:00
Johan Frick f76a596572 Add Mushroom Number Card (#79)
A Mushroom Number Card for number and input_number entities.
2023-10-31 14:41:37 +01:00
Ferry CoolsandJohan Frick d8274b1272 Add possibility to hide home elements
Elements of the home view can be hidden by listing them at the strategy
options:

```YAML
strategy:
  type: custom:mushroom-strategy
  options:
    homeView:
      hidden:
        - Greeting
        - AreaTitle
views: []
```
---------

Co-authored-by: Johan Frick <johan.frick@gmail.com>
2023-10-23 11:51:02 +02:00
Johan FrickandDigiLive 98ef9fed05 Add options for all areas (#52)
Area identifier `_` sets the options for all areas.
Options for a specific area can still be overridden like before.

Also the HA area-card is added to use as a strategy area-card.

---------

Co-authored-by: DigiLive <info@digilive.nl>
2023-10-13 08:12:11 +02:00
Aalian Khan 8f4fce7d54 Fix Home view not loading because of lack of weather entity 2023-09-25 22:04:57 -04:00
DigiLive 629dfa610d Fix 2 Title cards in pre-built views
Closes #56
2023-09-19 18:36:43 +02:00
Aalian Khan 3bbbdad035 Merge branch 'main' of https://github.com/AalianKhan/mushroom-strategy into hide-devices 2023-09-19 11:03:45 -04:00
Aalian Khan 3063776a5f Refactor grouped cards 2023-09-19 10:47:35 -04:00
Aalian Khan 7ab85afb85 Refactor to look at card_options instead 2023-09-14 15:58:59 -04:00
Aalian Khan 01c6205c02 Add option to hide all entities of a device.
#48
2023-09-14 15:40:37 -04:00
Aalian Khan 14f514fffe Fix area title position
put the area title card inside the vertical stack so everything matches up in the desktop view.
2023-09-13 19:20:41 -04:00
Aalian Khan 0d3b0a9089 Refactor bug fix 2023-09-11 11:33:46 -04:00
Aalian Khan 178a2fe003 Fix hiding default domain
this solution works, but it uses another variable. If you have a better idea, please feel free to share
2023-09-09 19:05:59 -04:00
Aalian Khan 703bd20bf2 Fix typdef.js for LockCardOptions 2023-09-07 16:39:46 -04:00
Aalian Khan df0f2b5568 Add LockCardOptions to typedef.js 2023-09-06 16:22:02 -04:00
Aalian Khan aad52cdadb Mark bug 2023-09-05 19:17:34 -04:00
Aalian Khan 1025201e2b Fix lock icon by adding lock domain
Fixes #41
2023-09-05 18:57:19 -04:00
Ferry Cools a6b2499a7b Merge branch 'main' into camera-fix 2023-08-15 15:28:27 +02:00
Aalian Khan e2889add02 Fix camera cards to use picture entity 2023-08-14 14:56:03 -04:00
Ferry Cools 140aec854b Add options to configure entity-cards (#31)
* Add options to configure entity-cards

Closes #10.
- Option to set the type of entity card.
- Option to hide an entity card from the dashboard.

* Add hiding title cards

When all entity cards are hidden for an area or domain, the
corresponding title cards will be hidden also.

* Fix Climate Chip navigation

Closes #33

* Build production distribution
2023-07-19 15:07:55 +02:00
Aalian Khan 5bded12e70 Add option to hide person cards
Now you should be able to hide person entities from the home page.
2023-06-25 23:19:20 -04:00