Refactor documentation

This commit is contained in:
DigiLive
2025-05-31 16:02:25 +02:00
parent 95794bf3b8
commit 6f3d9de56d
19 changed files with 366 additions and 206 deletions

View File

@ -1,167 +0,0 @@
# 🤝 Contributing to Mushroom Strategy
We love contributions from the community! Whether you're reporting a bug, suggesting a new feature, or submitting code
changes, your help makes the Mushroom Strategy better for everyone.
Please take a moment to review this guide before making a contribution.
## 📜 Code of Conduct
To ensure a welcoming and inclusive environment, all contributors are expected to adhere to
our [Code of Conduct](https://github.com/DigiLive/mushroom-strategy/blob/main/CODE_OF_CONDUCT.md). Please read it
carefully.
---
## 🐞 Reporting Bugs
Found a bug? That's not ideal, but your report helps us squash it!
1. **Check existing issues:** Before opening a new issue, please search
our GitHub [Issues](https://github.com/DigiLive/mushroom-strategy/issues)
or [Discussions](https://github.com/DigiLive/mushroom-strategy/discussions) to see if the bug has already been
reported.
2. **Open a new issue:** If it's a new bug, please open
a [new issue](https://github.com/DigiLive/mushroom-strategy/issues/new?template=bug_report.yml).
3. **Provide details:** In your report, please include:
* A clear and concise description of the bug.
* Steps to reproduce the behavior.
* Expected behavior.
* Screenshots or animated GIFs (if applicable).
* Your Home Assistant version and Mushroom Strategy version.
---
## ✨ Suggesting Features
Have a great idea for a new feature or enhancement? We'd love to hear it!
1. **Check existing suggestions:** Search our GitHub [Issues](https://github.com/DigiLive/mushroom-strategy/issues)
or [Discussions](https://github.com/DigiLive/mushroom-strategy/discussions) to see if the feature has already been
requested.
2. **Open a new issue:** If it's a new idea, open
a [new issue](https://github.com/DigiLive/mushroom-strategy/issues/new?template=feature_request.yml).
3. **Describe your idea:** Clearly explain the feature, why you think it's useful, and any potential use cases.
---
## 💻 Contributing Code
Want to get your hands dirty with the code? Awesome! We appreciate all code contributions.
1. **Fork the Repository:** Start by forking
the [DigiLive/mushroom-strategy](https://github.com/DigiLive/mushroom-strategy) repository to your own GitHub
account.
2. **Clone Your Fork:** Clone your forked repository to your local machine.
```bash
git clone https://github.com/YOUR_USERNAME/mushroom-strategy.git
cd mushroom-strategy
```
3. **Create a New Branch:** Create a new branch for your feature or bug fix.
Use a descriptive name (e.g., `feature/my-awesome-feature`, `bugfix/fix-admonition-rendering`).
```bash
git checkout -b feature/my-new-feature
```
4. **Set up Development Environment:**
* Ensure you have Node.js and npm installed.
* Install project dependencies: `npm install`
* You can build the strategy with `npm run build` (for production) or `npm run build-dev` (for development/testing).
* Copy the built files to your Home Assistant's `www/community/mushroom-strategy` folder for testing.
5. **Make Your Changes:** Implement your bug fix or new feature.
6. **Test Your Changes:** Thoroughly test your changes to ensure they work as expected and don't introduce new issues.
7. **Commit Your Changes:**
* We follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for clear commit history.
* Example: `feat: add new card option` or `fix: correct card rendering issue`
```bash
git add .
git commit -m "feat: add super cool new feature"
```
8. **Push to Your Fork:**
```bash
git push origin feature/my-new-feature
```
9. **Create a Pull Request (PR):**
* Go to your forked repository on GitHub.
* You should see a prompt to create a pull request from your new branch to the `main` branch of
`DigiLive/mushroom-strategy`.
* Provide a clear title and description for your PR, referencing any related issues.
* Be prepared to discuss your changes and address any feedback during the review process.
---
## 📄 Improving Documentation
Good documentation is vital! If you find typos, unclear sections, or want to add more examples, please open a pull
request. The documentation is located in the `docs/` folder of this repository.
---
## 🌐 Translations
Help us make Mushroom Strategy accessible to more users around the world by contributing and improving translations!
Language tags have to follow [BCP 47](https://tools.ietf.org/html/bcp47).
A list of most language tags can be found
here: [IANA subtag registry](http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
Examples: fr, fr-CA, zh-Hans.
1. **Check for Existing Translations:** See if your language is already being worked on or exists.
2. **Locate Translation Files:** Language files are found within the `src/translations` directory.
Each language has its own `locale.json` file (e.g., `en.json`, `nl.json`, `pt-BR.json`).
3. **Create or Update:**
* **To create a new language:** Copy an existing `.json` file (e.g., `en.json`), rename it to your language
code (e.g., `de.json` for German), and translate the property values.
* **To update an existing language:** Open the `.json` file for your language and update any missing or
outdated translations.
4. **Submit a Pull Request:** Once your translations are complete, submit a pull request with your changes. Clearly
state which language you are contributing to or updating.
!!! info
**Integrating a new Translation:**
* For your new language file to be picked up, it needs to be imported and registered at file
`src/utilities/localize.ts`.
* You will need to add an `import` statement for your new `.json` file at the top, following the existing pattern.
* Then, you'll need to add it to the `languages` map, associating the language code with the imported module.
**Special Handling for `language-country` Locales:**
If you are adding a country-specific locale (e.g., `es-ES` for Spanish (Spain) or `en-GB` for English
(United Kingdom)), you should create a file like `en-GB.json` in the `translations` folder. In
`src/utilities/localize.ts`, you'll import it similarly and add it to the `languages` map using the full locale
code.
Please ensure you follow existing patterns for `language-country` codes, which typically use a hyphen (`-`) + a
UPPER-cased country code in the file name and an underscore (`_`) + a lower-cased country code in the import key.
!!! example
```typescript
import * as en from '../translations/en.json';
import * as pt_br from '../translations/pt-BR.json';
/** Registry of currently supported languages */
const languages: Record<string, unknown> = {
en,
'pt-BR': pt_br,
};
```
---
## 🙏 Get Support
If you have questions about contributing or need help with your setup, please open
a [discussion](https://github.com/DigiLive/mushroom-strategy/discussions) on our GitHub repository.

35
docs/contributing/code.md Normal file
View File

@ -0,0 +1,35 @@
# 💻 Contributing Code
Want to get your hands dirty with the code? Awesome! We appreciate all code contributions.
1. **Follow the [Workflow](workflow.md):**
2. **Make Your Changes:** Implement your bug fix or new feature.
3. **Test Your Changes:** Thoroughly test your changes to ensure they work as expected and don't introduce new issues.
* You can build the strategy with `npm run build` (for production) or `npm run build-dev` (for development/testing).
* Copy the built files to your Home Assistant's `www/community/mushroom-strategy` directory for testing.
**Remember to clear the cache of your Home Assistant client** to see the changes.
!!! info
If your `www/community/mushroom-strategy` directory contains a file called `mushroom-strategy.js.gz`, rename or
delete it.
4. **Format and Lint Your Changes:**
* Run the formatter with `npm run ts:format`.
* Build the strategy with `npm run build`.
Both of these tasks should result without errors.
5. **Commit Your Changes.**
6. **Push to Your Fork.**
7. **Open a Pull Request (PR).**
---
Thank you for taking the time to help us improve our project! Your contributions make a real difference. 🎉

View File

@ -0,0 +1,69 @@
# 📄 Contributing to the Documentation
Good documentation is crucial for our project's success!
We truly appreciate any contributions, whether it's fixing a typo, clarifying a section, adding more examples, or even
extending existing topics. This guide will walk you through the process of contributing.
The entire documentation lives in the `docs/` folder of this repository.
---
1. **Follow the [Workflow](workflow.md):**
2. **Serve the Documentation Locally**:
Start the local development server. This task needs to be run from the **project root** (where the `mkdocs.yml` file is):
```bash
mkdocs serve
```
This will usually launch a local server, at `http://127.0.0.1:8000`.
The server will automatically reload in your browser as you make and save changes to the documentation files.
To stop the server, press **Ctrl + C** in the terminal.
3. **Edit Markdown Files**: All documentation content is written in **Markdown** (`.md` files).
You can find them within the `docs/` folder.
- For advanced formatting options, refer to the [Material for MkDocs reference](https://squidfunk.github.io/mkdocs-material/reference/).
4. **Add New Pages**:
- Create a new `.md` file in the most appropriate directory within `docs/`.
!!! important
You'll need to add the new page to the navigation (`nav`) section of the `mkdocs.yml` file for it to appear in
the sidebar. Follow the existing structure.
5. **Add Images**:
- Place any image files into the `docs/images/` directory.
- Reference them in your Markdown using the syntax: `![Alt text for accessibility](images/your-image-name.png)`
6. **Preview Changes**: As you save your `.md` files, the local server running at `http://127.0.0.1:8000` will
automatically refresh, allowing you to see your changes instantly.
7. **Format and Lint Your Changes:**
- Build the linter with `npm run md:lint-fix`.
This task should result without errors.
8. **Commit Your Changes.**
9. **Push to Your Fork.**
10. **Open a Pull Request (PR).**
---
## Documentation Style and Quality
To maintain consistency and quality:
- **Clarity and Conciseness**: Use straightforward, clear, and concise language.
- **Examples**: Include images and code examples whenever they help clarify a point.
---
Thank you for taking the time to help us improve our documentation! Your contributions make a real difference. 🎉

View File

@ -0,0 +1,41 @@
# 🚀 Getting Started
## ⚙️ Prerequisites
Before you begin, make sure you have the following installed on your system:
- **Git**: For version control and managing your changes.
- **Node.js and npm**: Required for running scripts defined in `package.json` (e.g., linting).
Download from [nodejs.org](https://nodejs.org/en/download/).
For contributing to the documentation, the following prerequisites are also required:
- **Python 3.7 or higher**: Download from [python.org/downloads](https://www.python.org/downloads/).
- **pip** (Python package installer): Usually comes with Python, but you can find installation instructions at
[pip.pypa.io/en/stable/installation/](https://pip.pypa.io/en/stable/installation/).
## 🛠️ Local Environment
To make and preview your changes, you'll need to set up a development environment locally:
1. **Fork the Repository**: Go to our main repository on GitHub and click the "Fork" button.
This creates a copy of the repository under your GitHub account.
2. **Clone Your Fork**: On your local machine, clone your forked repository using Git.
3. **Install Node.js Dependencies**:
Navigate to the root of the cloned project (where `package.json` is located) and install its dependencies:
```bash
npm install
```
4. **Install Python Documentation Tools**:
Navigate to the root of the cloned project (where `mkdocs.yml` is located) and install MkDocs along with the
necessary themes and plugins:
```bash
pip install mkdocs mkdocs-material mkdocs-material-extensions
```

View File

@ -0,0 +1,53 @@
# 🤝 Contributing to Mushroom Strategy
We love contributions from the community! Whether you're reporting a bug, suggesting a new feature, or submitting code
changes, your help makes the Mushroom Strategy better for everyone.
Please take a moment to review this guide before making a contribution.
## 📜 Code of Conduct
To ensure a welcoming and inclusive environment, all contributors are expected to adhere to
our [Code of Conduct](https://github.com/DigiLive/mushroom-strategy/blob/main/CODE_OF_CONDUCT.md). Please read it
carefully.
---
## 🐞 Reporting Bugs
Found a bug? That's not ideal, but your report helps us squash it!
1. **Check existing issues:** Before opening a new issue, please search
our GitHub [Issues](https://github.com/DigiLive/mushroom-strategy/issues)
or [Discussions](https://github.com/DigiLive/mushroom-strategy/discussions) to see if the bug has already been
reported.
2. **Open a new issue:** If it's a new bug, please open
a [new issue](https://github.com/DigiLive/mushroom-strategy/issues/new?template=bug_report.yml).
3. **Provide details:** In your report, please follow the instructions and template to include:
* A clear and concise description of the bug.
* Steps to reproduce the behavior.
* Expected behavior.
* Screenshots or animated GIFs (if applicable).
* Your Home Assistant version and Mushroom Strategy version.
---
## ✨ Suggesting Features
Have a great idea for a new feature or enhancement? We'd love to hear it!
1. **Check existing suggestions:** Search our GitHub [Issues](https://github.com/DigiLive/mushroom-strategy/issues)
or [Discussions](https://github.com/DigiLive/mushroom-strategy/discussions) to see if the feature has already been
requested.
2. **Open a new issue:** If it's a new idea, open
a [new issue](https://github.com/DigiLive/mushroom-strategy/issues/new?template=feature_request.yml).
3. **Describe your idea:** Clearly explain the feature, why you think it's useful, and any potential use cases by
following the instructions and template.
---
## 🙏 Get Support
If you have questions about contributing or need help with your setup, please open a
[discussion](https://github.com/DigiLive/mushroom-strategy/discussions) on our GitHub repository.

View File

@ -0,0 +1,74 @@
# 🌐 Translations
Help us make Mushroom Strategy accessible to more users around the world by contributing and improving translations!
Language tags have to follow [BCP 47](https://tools.ietf.org/html/bcp47).
A list of most language tags can be found here:
[IANA subtag registry](http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
Examples: fr, fr-CA, zh-Hans.
1. **Check for Existing Translations:** See if your language is already being worked on or exists.
2. **Locate Translation Files:** Language files are found within the `src/translations` directory.
Each language has its own `locale.json` file (e.g., `en.json`, `nl.json`, `pt-BR.json`).
3. **Create or Update:**
* **To create a new language:** Copy an existing `.json` file (e.g., `en.json`), rename it to your language
code (e.g., `de.json` for German), and translate the property values.
* **To update an existing language:** Open the `.json` file for your language and update any missing or
outdated translations.
4. **Test Your Changes:** Thoroughly test your changes to ensure they work as expected and don't introduce new issues.
* You can build the strategy with `npm run build` (for production) or `npm run build-dev` (for development/testing).
* Copy the built files to your Home Assistant's `www/community/mushroom-strategy` directory for testing.
**Remember to clear the cache of your Home Assistant client** to see the changes.
!!! info
If your `www/community/mushroom-strategy` directory contains a file called `mushroom-strategy.js.gz`, rename or
delete it.
5. **Format and Lint Your Changes:**
* Run the formatter with `npm run json:format`.
* Run the formatter with `npm run ts:format`.
* Build the strategy with `npm run build`.
All of these tasks should result without errors.
6. **Commit Your Changes.**
7. **Push to Your Fork.**
8. **Open a Pull Request (PR).**
---
!!! info
**Integrating a new Translation:**
* For your new language file to be picked up, it needs to be imported and registered at file
`src/utilities/localize.ts`.
* You will need to add an `import` statement for your new `.json` file at the top, following the existing pattern.
* Then, you'll need to add it to the `languages` map, associating the language code with the imported module.
**Special Handling for `language-country` Locales:**
If you are adding a country-specific locale (e.g., `es-ES` for Spanish (Spain) or `en-GB` for English
(United Kingdom)), you should create a file like `en-GB.json` in the `translations` folder. In
`src/utilities/localize.ts`, you'll import it similarly and add it to the `languages` map using the full locale
code.
Please ensure you follow existing patterns for `language-country` codes, which typically use a hyphen (`-`) + a
UPPER-cased country code in the file name and an underscore (`_`) + a lower-cased country code in the import key.
!!! example
```typescript
import * as en from '../translations/en.json';
import * as pt_br from '../translations/pt-BR.json';
/** Registry of currently supported languages */
const languages: Record<string, unknown> = {
en,
'pt-BR': pt_br,
};
```

View File

@ -0,0 +1,41 @@
# 🚀 Contributing Workflow
This guide outlines a common workflow for contributing to our project.
---
1. **Fork the Repository**
Start by forking **our repository** (the upstream project) to your own GitHub account.
This creates a personal copy where you can make your changes without affecting the original project directly.
2. **Clone Your Fork**
Clone your forked repository from your GitHub account to your local machine.
3. **Set Up Your Local Development Environment**
Before making changes, ensure your local environment is ready.
See [Getting Started](getting-started.md).
4. **Make Your Changes**
Work in a new branch for better organization and easier pull requests and Implement your bug fix, new feature, or
documentation update.
See chapters [Code](code.md), [Documentation](documentation.md), and [Translations](translations.md) for guidance and
details.
5. **Test Your Changes**
Thoroughly test your changes to ensure they work as expected, address the intended problem, and do not introduce any
new issues or regressions.
6. **Format and Lint Your Changes**
Your code should be well-formatted and linted to ensure consistency and readability.
If you've set up the project correctly, the tools for this should already be available to this project.
7. **Commit Your Changes**
Stage your changes and commit them with a clear, descriptive message.
Aim for a concise subject line followed by a more detailed body if necessary.
E.g.:
```text
Fix: Resolve issue with feature X
A clear and concise description of what has been changed, why it was necessary, and any relevant context.
```

View File

@ -1,4 +1,4 @@
# Full example using all the options provided with the strategy # 📝 Full example using all the options provided with the strategy
```yaml ```yaml
strategy: strategy:

View File

@ -1,4 +1,4 @@
# Basic Setup # ⚙️ Basic Setup
To apply the Mushroom Strategy to a dashboard: To apply the Mushroom Strategy to a dashboard:
@ -10,18 +10,18 @@ To apply the Mushroom Strategy to a dashboard:
```yaml ```yaml
strategy: strategy:
type: custom:mushroom-strategy type: custom:mushroom-strategy
views: []
``` ```
> [!NOTE] !!!warning
> You may see the following error:
``` You may see the following error:
Error loading the dashboard strategy:
Error: Timeout waiting for strategy ```
element ||-strategy-mushroom-strategy to Error loading the dashboard strategy:
be registered Error: Timeout waiting for strategy
``` element ||-strategy-mushroom-strategy to
be registered
```
This is mainly because of cache issues or HACS didn't create a reference. This is mainly because of cache issues or HACS didn't create a reference.
Try clearing the cache of your client and/or re-downloading the strategy from HACS. Try clearing the cache of your client and/or re-downloading the strategy from HACS.

View File

@ -1,6 +1,6 @@
# Installation # 🚀 Installation
## Prerequisites ## ⚙️ Prerequisites
Mushroom dashboard strategy and dependencies are available in [HACS][hacsUrl]{: target="_blank"} (Home Assistant Mushroom dashboard strategy and dependencies are available in [HACS][hacsUrl]{: target="_blank"} (Home Assistant
Community Store). Community Store).
@ -25,13 +25,13 @@ They will open the HACS repository at your Home Assistant instance directly.
[![Open in HACS at your Home Assistant instance.][hacsBadge]][hacsMiniGraphUrl]{: target="_blank"} to [![Open in HACS at your Home Assistant instance.][hacsBadge]][hacsMiniGraphUrl]{: target="_blank"} to
install [Mini graph card][miniGraphUrl]{: target="_blank"}. install [Mini graph card][miniGraphUrl]{: target="_blank"}.
## Dashboard Installation ## 🛠️ Dashboard Installation
If you meet all the prerequisites, click the badge below to install the strategy. If you meet all the prerequisites, click the badge below to install the strategy.
[![Open in HACS at your Home Assistant instance.][hacsBadge]][hacsStrategyUrl]{: target="_blank"} [![Open in HACS at your Home Assistant instance.][hacsBadge]][hacsStrategyUrl]{: target="_blank"}
## Local Installation ## 🛠️ Local Installation
Please install the strategy with HACS as described above. Please install the strategy with HACS as described above.
If you require testing a custom build for debug purposes, follow these steps: If you require testing a custom build for debug purposes, follow these steps:
@ -41,14 +41,16 @@ If you require testing a custom build for debug purposes, follow these steps:
3. If file `mushroom-strategy.js.gz` exists in that folder, rename or delete it. 3. If file `mushroom-strategy.js.gz` exists in that folder, rename or delete it.
!!! note !!! note
Refresh the cache of the client you use to access Home Assistant. Refresh the cache of the client you use to access Home Assistant.
## Updating ## 🔄 Updating
By default, Home Assistant will notify you when an update of the strategy is available. By default, Home Assistant will notify you when an update of the strategy is available.
You can update the strategy by going to `Settings` found at the bottom of the sidebar. You can update the strategy by going to `Settings` found at the bottom of the sidebar.
!!! tip !!! tip
You can enable notifications of pre-releases. You can enable notifications of pre-releases.
* Go to `Settings` > `Devices & services` > `Entities`. * Go to `Settings` > `Devices & services` > `Entities`.

View File

@ -1,4 +1,4 @@
# Welcome to the Mushroom Strategy Documentation :material-mushroom: &nbsp; # :brown_mushroom: Welcome to the Mushroom Strategy Documentation
[![Release][releaseBadge]][releaseUrl] [![Release][releaseBadge]][releaseUrl]
[![HACS][hacsBadge]][hacsUrl] [![HACS][hacsBadge]][hacsUrl]
@ -53,7 +53,7 @@ engage with the community!
to :heart: [sponsor the project](https://github.com/sponsors/DigiLive) to support its continued development! Your to :heart: [sponsor the project](https://github.com/sponsors/DigiLive) to support its continued development! Your
support helps us grow and improve. support helps us grow and improve.
## Previews ## 👀 Sneak Peak
![Preview GIF](images/preview.gif) ![Preview GIF](images/preview.gif)

View File

@ -1,6 +1,6 @@
# Area Options # 🛋️ Area Options
The `areas` group enables you to specify the configuration of specific areas. The `areas` group enables you to specify the configuration of specific areas.
Each configuration is identified by an area id and can have the following options: Each configuration is identified by an area id and can have the following options:
| Name | Type | Default | Description | | Name | Type | Default | Description |
@ -19,7 +19,7 @@ Please follow the links below to see the additional options per card type.
## Extra Cards ## Extra Cards
The `extra_cards` group enables you to specify the configuration of additional cards an Area view. The `extra_cards` group enables you to specify the configuration of additional cards an Area view.
These cards will be shown last in the view. These cards will be shown last in the view.
See Home View Options → [Extra Cards](#extra-cards) for more information. See Home View Options → [Extra Cards](#extra-cards) for more information.
@ -90,7 +90,8 @@ views: []
``` ```
!!! note !!! note
Area specific options take precedence over options set for all areas.!
Area specific options take precedence over options set for all areas!
<!-- References --> <!-- References -->

View File

@ -1,4 +1,4 @@
# Card Options # :material-cards-outline: Card Options
The `card_options` group enables you to specify the configuration of entity cards. The `card_options` group enables you to specify the configuration of entity cards.
Each configuration is identified by an entity id and can have the following options: Each configuration is identified by an entity id and can have the following options:
@ -30,6 +30,6 @@ strategy:
``` ```
!!! tip !!! tip
You can build your card at another dashboard and copy the `cards` group from the YAML of that dashboard into group You can build your card at another dashboard and copy the `cards` group from the YAML of that dashboard into group
`card_options` of the strategy configuration. `card_options` of the strategy configuration. The YAML can be found in the Raw configuration editor.
The YAML can be found in the Raw configuration editor.

View File

@ -1,6 +1,6 @@
# Domain Options # 💡 Domain Options
The `domains` group enables you to specify the configuration of a domain in a view. The `domains` group enables you to specify the configuration of a domain in a view.
Each configuration is identified by a domain name and can have the following options: Each configuration is identified by a domain name and can have the following options:
| Option | type | Default | Description | | Option | type | Default | Description |

View File

@ -1,4 +1,4 @@
# Home View Options # 🏠 Home View Options
The `home_view` group enables you to specify the configuration of the Home view. The `home_view` group enables you to specify the configuration of the Home view.
@ -35,7 +35,7 @@ strategy:
## Stack Count ## Stack Count
The `stack_count` option is a map of sections to define the number of cards per row. The `stack_count` option is a map of sections to define the number of cards per row.
The key of the map is the section, while the value is the number of cards per row. The key of the map is the section, while the value is the number of cards per row.
The `areas` section is a special case, where the value is an array of two numbers. The `areas` section is a special case, where the value is an array of two numbers.
@ -53,7 +53,8 @@ home_view:
``` ```
!!! note !!! note
Section specific options take precedence over options set for all sections.!
Section specific options take precedence over options set for all sections!
--- ---
@ -83,6 +84,7 @@ If `weather_entity` is set to `auto`, the weather chip uses the first entity of
You can define a custom entity to use by setting an entity id. You can define a custom entity to use by setting an entity id.
!!! note !!! note
To hide the weather chip, you should hide or disable the entity itself. To hide the weather chip, you should hide or disable the entity itself.
### Example ### Example
@ -105,6 +107,7 @@ To add custom chips, you can configure them in `extra_chips`.
See [Mushroom Chips][chipDocUrl]{: target="_blank"} for all available chips. See [Mushroom Chips][chipDocUrl]{: target="_blank"} for all available chips.
!!! tip !!! tip
You can build your chips in a temporary card in another dashboard and copy the `chips` group from the YAML of that You can build your chips in a temporary card in another dashboard and copy the `chips` group from the YAML of that
card into group `extra_chips` of the strategy configuration. The YAML can be found in the Raw configuration editor. card into group `extra_chips` of the strategy configuration. The YAML can be found in the Raw configuration editor.
@ -139,9 +142,9 @@ These cards will be shown between the greeting card and area cards.
Each card can have the options as described at [Card Options](card-options.md). Each card can have the options as described at [Card Options](card-options.md).
!!! tip !!! tip
You can build your view in a temporary dashboard and copy the `views` group from the YAML of that dashboard into You can build your view in a temporary dashboard and copy the `views` group from the YAML of that dashboard into
group `extra_views` of the strategy configuration. group `extra_views` of the strategy configuration. The YAML can be found in the Raw configuration editor.
The YAML can be found in the Raw configuration editor.
### Example ### Example
@ -175,8 +178,7 @@ Each card can have the options as described at [Card Options](card-options.md).
!!! tip !!! tip
You can build your view in a temporary dashboard and copy the `views` group from the YAML of that dashboard into You can build your view in a temporary dashboard and copy the `views` group from the YAML of that dashboard into
group `extra_cards` of the strategy configuration. group `extra_cards` of the strategy configuration. The YAML can be found in the Raw configuration editor.
The YAML can be found in the Raw configuration editor.
#### Example #### Example

View File

@ -1,4 +1,4 @@
# Overview # ⚙️ Overview
The dashboard can be highly customized using the `options` parameter in the yaml configuration of your dashboard. The dashboard can be highly customized using the `options` parameter in the yaml configuration of your dashboard.

View File

@ -1,4 +1,4 @@
# View Options # 👀 View Options
Mushroom strategy includes several views to control/view entities of a specific domain. Mushroom strategy includes several views to control/view entities of a specific domain.
Hidden/Disabled entities or linked to a hidden area are excluded from the view. Hidden/Disabled entities or linked to a hidden area are excluded from the view.
@ -54,6 +54,7 @@ The `extra_views` group enables you to specify the configuration of additional v
Each view can have the options as described in the [Home Assistant documentation][viewDocUrl]{: target="_blank"}. Each view can have the options as described in the [Home Assistant documentation][viewDocUrl]{: target="_blank"}.
!!! tip !!! tip
You can build your view in a temporary dashboard and copy the `views` group from the YAML of that dashboard into You can build your view in a temporary dashboard and copy the `views` group from the YAML of that dashboard into
group `extra_views` of the strategy configuration. The YAML can be found in the Raw configuration editor. group `extra_views` of the strategy configuration. The YAML can be found in the Raw configuration editor.

View File

@ -60,7 +60,13 @@ nav:
- View Options: options/view-options.md - View Options: options/view-options.md
- Full Example: full-example.md - Full Example: full-example.md
- FAQ: faq.md - FAQ: faq.md
- Contributing: contributing.md - Contributing:
- contributing/index.md
- Getting Started: contributing/getting-started.md
- Workflow: contributing/workflow.md
- Code: contributing/code.md
- Documentation: contributing/documentation.md
- Translations: contributing/translations.md
markdown_extensions: markdown_extensions:
- toc: - toc:

View File

@ -47,9 +47,11 @@
"webpack-cli": "^6.0.1" "webpack-cli": "^6.0.1"
}, },
"scripts": { "scripts": {
"ts:format": "prettier --write \"**/*.ts\"",
"json:format": "prettier --write \"**/*.json\"",
"mkdocs:serve": "mkdocs serve", "mkdocs:serve": "mkdocs serve",
"lint:md": "markdownlint-cli2 \"**/*.md\" \"#node_modules\"", "md:lint": "markdownlint-cli2 \"**/*.md\" \"#node_modules\" \"#dist\"",
"fix:md": "markdownlint-cli2 \"**/*.md\" \"#node_modules\" \"#dist\" \"#build\" --fix", "md:lint:fix": "markdownlint-cli2 \"**/*.md\" \"#node_modules\" \"#dist\" --fix",
"build-dev": "webpack --config webpack.dev.config.ts", "build-dev": "webpack --config webpack.dev.config.ts",
"build": "webpack", "build": "webpack",
"bump": "bump --preid alpha package.json package-lock.json README.md ./src/mushroom-strategy.ts" "bump": "bump --preid alpha package.json package-lock.json README.md ./src/mushroom-strategy.ts"