Refactor repository references

This commit is contained in:
DigiLive
2025-04-26 09:04:33 +02:00
parent 0a510648e0
commit 1bfda2ca22
5 changed files with 114 additions and 94 deletions

1
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1 @@
github: DigiLive

View File

@ -45,7 +45,7 @@ via an official social media account, or acting as an appointed representative a
## Enforcement ## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible
for enforcement at <aaliankhan5@gmail.com>. All complaints will be reviewed and investigated promptly and fairly. for enforcement. All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the reporter's privacy and security of any incident. All community leaders are obligated to respect the reporter's privacy and security of any incident.

View File

@ -1,4 +1,4 @@
# Contributing to Mushroom Strategy # Contributing to this project
First off, thanks for taking the time to contribute! First off, thanks for taking the time to contribute!
@ -10,12 +10,13 @@ Please make sure to read the relevant section before making your contribution.
It will make it a lot easier for us maintainers and smooth out the experience for all involved. It will make it a lot easier for us maintainers and smooth out the experience for all involved.
The community looks forward to your contributions. The community looks forward to your contributions.
> And if you like the project, but just don't have time to contribute, that's fine. > And if you like the project but just don't have time to contribute, that's fine.
> There are other easy ways to support the project and show your appreciation, which we would also be thrilled about: > There are other easy ways to support the project and show your appreciation, which we would also be thrilled about:
> - Star the project > - Star the project
> - Tweet about it > - Tweet about it
> - Refer this project in your project's readme > - Refer this project at your project's readme
> - Mention the project at local meetups and tell your friends/colleagues > - Mention the project at local meetups and tell your friends/colleagues
> - Sponsor the project at GitHub Sponsors
## Table of Contents ## Table of Contents
@ -29,34 +30,41 @@ The community looks forward to your contributions.
- [Code Style](#code-style) - [Code Style](#code-style)
- [Commit Messages](#commit-messages) - [Commit Messages](#commit-messages)
---
## Code of Conduct ## Code of Conduct
This project and everyone participating in it is governed by This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md).
the [Mushroom Strategy Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to a project leader.
By participating, you are expected to uphold this code. Please report unacceptable behavior to <aaliankhan5@gmail.com>.
---
## I Have a Question ## I Have a Question
> If you want to ask a question, we assume that you have read the [README](README.md) file or the > [!TIP]
> available [Documentation](https://github.com/AalianKhan/mushroom-strategy/wiki). > Before you ask a question, we assume that you have read the [README](README.md) file or the
> available [Documentation](../../wiki).
Before you ask a question, it is best to search for Before you ask a question, it is best to search for existing [discussions](../../discussions) or [Issues](../../issues)
existing [Issues](https://github.com/AalianKhan/mushroom-strategy/issues) that might help you. that might
In case you have found a suitable issue and still need clarification, you can write your question in this issue. help you.
In case you have found a suitable topic and still need clarification, you can address your question in that topic.
It is also advisable to search the internet for answers first. It is also advisable to search the internet for answers first.
If you then still feel the need to ask a question and need clarification, we recommend the following: If you then still feel the need to ask a question and need clarification, we recommend the following:
- Open an [Issue](https://github.com/AalianKhan/mushroom-strategy/issues/new/choose). - Open a new [discussion](../../discussions/new/choose) or [issue](../../issues/new/choose).
- Provide as much context as you can about what you're running into. - Provide as much context as you can about what you're running into.
- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. - Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.
We will then take care of the issue as soon as possible. We will then take care of the issue as soon as possible.
---
## I Want To Contribute ## I Want To Contribute
> ### Legal Notice > ![Important]
> > Legal Notice:
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the > When contributing to this project, you must agree that you have authored 100% of the content, that you have the
> necessary rights to the content, and that the content you contribute may be provided under the project license. > necessary rights to the content, and that the content you contribute may be provided under the project license.
@ -69,13 +77,11 @@ Therefore, we ask you to investigate carefully, collect information, and describ
Please complete the following steps in advance to help us fix any potential bug as fast as possible. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
- Make sure that you are using the latest version. - Make sure that you are using the latest version.
- Determine if your bug is really a bug and not an error on your side, e.g. using incompatible environment - Determine if your bug is really a bug and not an error on your side, e.g., using incompatible environment
components/versions (Make sure that you have read components/versions (Make sure that you have read the [documentation](../../wiki).
the [documentation](https://github.com/AalianKhan/mushroom-strategy/wiki).
If you are looking for support, you might want to check [this section](#i-have-a-question)). If you are looking for support, you might want to check [this section](#i-have-a-question)).
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there - To see if other users have experienced (and potentially already solved) the same issue you are having, check if there
is not already a bug report existing for your bug or error in is not already a bug report existing for your bug or error in the [bug tracker](../../issues?q=label%3Abug).
the [bug tracker](https://github.com/AalianKhan/mushroom-strategy/issues?q=label%3Abug).
- Also make sure to search the internet (including Stack Overflow) to see if users outside the GitHub community have - Also make sure to search the internet (including Stack Overflow) to see if users outside the GitHub community have
discussed the issue. discussed the issue.
- Collect information about the bug: - Collect information about the bug:
@ -87,17 +93,17 @@ Please complete the following steps in advance to help us fix any potential bug
#### How Do I Submit a Good Bug Report? #### How Do I Submit a Good Bug Report?
> [!CAUTION]
> You must never report security related issues, vulnerabilities, or bugs including sensitive information to the issue > You must never report security related issues, vulnerabilities, or bugs including sensitive information to the issue
> tracker, or elsewhere in public. > tracker, or elsewhere in public.
> Instead, sensitive bugs must be sent by email to <aaliankhan5@gmail.com>. > Instead, sensitive bugs must be sent by email to a project leader.
We use GitHub issues to track bugs and errors. If you run into an issue with the project: We use GitHub issues to track bugs and errors. If you run into an issue with the project:
- Open an [Issue](https://github.com/AalianKhan/mushroom-strategy/issues/new/choose). - Open an [issue](../../issues/new/choose).
- Explain the behavior you would expect and the actual behavior. - Explain the behavior you would expect and the actual behavior.
- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to - Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to
recreate the issue on their own. recreate the issue on their own. This usually includes your code.
This usually includes your code.
For good bug reports, you should isolate the problem and create a reduced test case. For good bug reports, you should isolate the problem and create a reduced test case.
- Provide the information you collected in the previous section. - Provide the information you collected in the previous section.
@ -121,34 +127,32 @@ suggestions.
#### Before Submitting an Enhancement #### Before Submitting an Enhancement
- Make sure that you are using the latest version. - Make sure that you are using the latest version.
- Read the [documentation](https://github.com/DigiLive/mushroom-strategy/wiki) carefully and find out if the - Read the [documentation](../../wiki) carefully and find out if the functionality is already covered, maybe by an
functionality is already covered, maybe by an individual configuration. individual
- Perform a [search](https://github.com/AalianKhan/mushroom-strategy/issues) to see if the enhancement has already been configuration.
suggested. - Search the [issue tracker](../../issues) to see if the enhancement has already been suggested.
If it has, add a comment to the existing issue instead of opening a new one. If it has, add a comment to the existing issue instead of opening a new one.
- Find out whether your idea fits with the scope and aims of the project. - Find out whether your idea fits with the scope and aims of the project.
It's up to you to make a strong case to convince the project's developers of the merits of this feature. It's up to you convince the developers of this feature's merits with a well-reasoned proposal.
Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset.
If you're just targeting a minority of users, consider writing an add-on/plugin library. If you're just targeting a minority of users, consider writing an add-on/plugin library.
#### How Do I Submit a Good Enhancement Suggestion? #### How Do I Submit a Good Enhancement Suggestion?
Enhancement suggestions are tracked as [GitHub issues](https://github.com/AalianKhan/mushroom-strategy/issues). Enhancement suggestions are tracked as [GitHub issues](../../issues).
- Use a **clear and descriptive title** for the issue to identify the suggestion. - Use a **clear and descriptive title** for the issue to identify the suggestion.
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible. - Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. - **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
At this point you can also tell which alternatives do not work for you. At this point, you can also tell which alternatives do not work for you.
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part - You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part
which the suggestion is related to. which the suggestion is related to.
You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows,
and [this tool](https://github.com/colinkeenan/silentcast) on Linux.
- **Explain why this enhancement would be useful** to most Mushroom Strategy users. - **Explain why this enhancement would be useful** to most Mushroom Strategy users.
You may also want to point out the other projects that solved it better and which could serve as inspiration. You may also want to point out the other projects that solved it better and which could serve as inspiration.
### Code Contribution ### Code Contribution
You can contribute to this project by following the _fork -> clone -> edit -> pull request_ workflow of GitHub. You can contribute to this project by following the _fork clone edit pull request_ workflow of GitHub.
#### Prevent changes to the distribution directory #### Prevent changes to the distribution directory
@ -157,14 +161,14 @@ As a help, you can configure your local git repository to ignore this directory.
```shell ```shell
git update-index --skip-worktree ./dist/ git update-index --skip-worktree ./dist/
git update-index --skip-worktree ./dist/mushroom-strategy.js git update-index --skip-worktree ./dist/name-of-the-file-to-ignore.js
``` ```
To revert above, run the following commands: To revert above, run the following commands:
```shell ```shell
git update-index --no-skip-worktree ./dist/ git update-index --no-skip-worktree ./dist/
git update-index --skip-worktree ./dist/mushroom-strategy.js git update-index --skip-worktree ./dist/name-of-the-file-to-ignore.js
``` ```
##### Additional method ##### Additional method
@ -195,7 +199,8 @@ git update-index --assume-unchanged ./dist/
### Code Style ### Code Style
All files must be properly formatted according to the settings in file [.editorconfig](./.editorconfig). All files are required to adhere to the formatting configurations specified within the [.editorconfig](.editorconfig)
file, should it be present.
### Commit Messages ### Commit Messages

42
LICENSE
View File

@ -1,21 +1,29 @@
MIT License BSD 3-Clause License
Copyright (c) 2023 Aalian Khan Copyright (c) 2025, Ferry Cools
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy Redistribution and use in source and binary forms, with or without
of this software and associated documentation files (the "Software"), to deal modification, are permitted provided that the following conditions are met:
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all 1. Redistributions of source code must retain the above copyright notice, this
copies or substantial portions of the Software. list of conditions and the following disclaimer.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2. Redistributions in binary form must reproduce the above copyright notice,
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, this list of conditions and the following disclaimer in the documentation
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE and/or other materials provided with the distribution.
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 3. Neither the name of the copyright holder nor the names of its
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE contributors may be used to endorse or promote products derived from
SOFTWARE. this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -17,49 +17,45 @@
## What is the Mushroom Dashboard Strategy? ## What is the Mushroom Dashboard Strategy?
Mushroom Dashboard Strategy provides a strategy for Home Assistant to automatically generate a dashboard using Mushroom Mushroom Dashboard Strategy provides a strategy for Home Assistant to automatically generate a dashboard
cards. using [Mushroom][mushroomUrl] cards.
It generates cards for your Home Assistants entities and areas, divided over several views. Dashboard cards are generated for your Home Assistant's entities, devices and areas, divided over several views.
Besides a Home view from where you can enter a subview of your areas, a separate view for lights, fans and other domains Starting at the Home view, you can enter an area subview.
are generated for easy access to your entities. For easy access, separate views are generated for entities which belong to specific domains.
### Features ### Features
- 🛠 Automatically create dashboard with three lines of yaml. - 🛠 Automatically create a dashboard with three lines of YAML.
- 😍 Built-in Views for device-specific controls. - 😍 Built-in Views for device-specific controls.
- 🎨 Many options to customize to fit your needs. - 🎨 Many options to customize to fit your needs.
- 📈 [Mini graph][miniGraphUrl] cards for sensor entities.
> [!TIP] > [!TIP]
> If you like this package, please star the [project at GitHub](https://github.com/AalianKhan/mushroom-strategy)! 🌟 > If you like this package, please star the [project at GitHub][repositoryUrl]!
## Getting started ## Getting started
The strategy is easily installable from [HACS][hacsUrl] (Home Assistant Community Store). The strategy is easily installable from [HACS][hacsUrl] (Home Assistant Community Store).
Please visit [Installation Guide](https://github.com/AalianKhan/mushroom-strategy/wiki/#installation) at our Wiki. Please visit [Installation Guide][installationUrl] at our Wiki.
## Need some help? ## Need some help?
Visit the [Discussions](https://github.com/AalianKhan/mushroom-strategy/discussions) page or the [Wiki](https://github.com/AalianKhan/mushroom-strategy/wiki). Visit the [Discussions][discussionsUrl] page or
the [Wiki][wikiUrl].
## Have an idea or want to report a bug? ## Have an idea or want to report a bug?
Make sure your idea or bug isn't discussed already in our Discussions or Issues! Make sure your idea or bug isn't discussed already in our Discussions or Issues!
Visit the [issues](https://github.com/AalianKhan/mushroom-strategy/issues/new/choose) page. Visit the [issues][issuesUrl] page.
## Collaborators
## Contributors
* [DigiLive](https://github.com/DigiLive) * [DigiLive](https://github.com/DigiLive)
[![Sponsor DigiLive][sponsorBadge]](https://github.com/sponsors/DigiLive) [![Sponsor DigiLive][sponsorBadge]](https://github.com/sponsors/DigiLive)
* [Johan Frick](https://github.com/johanfrick) * [Aalian Khan](https://github.com/AalianKhan)
## Credits
* The cards used are from [Mushroom][mushroomUrl] and [Mini graph card][miniGraphUrl].
* Took inspiration from [Balloob battery strategy][balloobBatteryUrl].
<!-- Badge References --> <!-- Badge References -->
@ -67,16 +63,26 @@ Visit the [issues](https://github.com/AalianKhan/mushroom-strategy/issues/new/ch
[sponsorBadge]: https://img.shields.io/badge/Sponsor_him-%E2%9D%A4-%23db61a2.svg?&logo=github&color=%23fe8e86 [sponsorBadge]: https://img.shields.io/badge/Sponsor_him-%E2%9D%A4-%23db61a2.svg?&logo=github&color=%23fe8e86
[releaseBadge]: https://img.shields.io/badge/Release-v2.2.0-blue [releaseBadge]: https://img.shields.io/badge/Release-v2.3.0-alpha.1-blue
<!-- Repository References -->
[repositoryUrl]: https://github.com/DigiLive/mushroom-strategy
[releaseUrl]: https://github.com/DigiLive/mushroom-strategy/releases/tag/v2.3.0-alpha.1
[issuesUrl]: https://github.com/DigiLive/mushroom-strategy/issues
[discussionsUrl]: https://github.com/DigiLive/mushroom-strategy/discussions
[wikiUrl]: https://github.com/DigiLive/mushroom-strategy/wiki
[installationUrl]: https://github.com/DigiLive/mushroom-strategy/wiki#installation
<!-- Other References --> <!-- Other References -->
[hacsUrl]: https://hacs.xyz [hacsUrl]: https://hacs.xyz
[releaseUrl]: https://github.com/AalianKhan/mushroom-strategy/releases/tag/v2.2.0
[mushroomUrl]: https://github.com/piitaya/lovelace-mushroom [mushroomUrl]: https://github.com/piitaya/lovelace-mushroom
[miniGraphUrl]: https://github.com/kalkih/mini-graph-card [miniGraphUrl]: https://github.com/kalkih/mini-graph-card
[balloobBatteryUrl]: https://gist.github.com/balloob/4a70c83287ddba4e9085cb578ffb161f