mirror of
https://github.com/DigiLive/mushroom-strategy.git
synced 2025-06-25 01:21:52 +02:00
Reformat code style
This commit is contained in:
@ -12,3 +12,6 @@ trim_trailing_whitespace = true
|
||||
|
||||
[{*.markdown,*.md}]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[docs/**/*.md]
|
||||
ij_formatter_enabled = false
|
8
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
8
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@ -1,6 +1,6 @@
|
||||
name: Bug Report
|
||||
description: File a bug report to help us improve the project.
|
||||
labels: ["bug"]
|
||||
labels: ['bug']
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
@ -49,9 +49,9 @@ body:
|
||||
label: Environment
|
||||
description: What environment were you using when you encountered the bug?
|
||||
options:
|
||||
- "Web Browser (specify name and version)"
|
||||
- "Mobile Application (specify OS and version)"
|
||||
- "Other (please specify, including version)"
|
||||
- 'Web Browser (specify name and version)'
|
||||
- 'Mobile Application (specify OS and version)'
|
||||
- 'Other (please specify, including version)'
|
||||
validations:
|
||||
required: true
|
||||
|
||||
|
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@ -1,6 +1,6 @@
|
||||
name: Feature Request
|
||||
description: Suggest a new feature or improvement for the project.
|
||||
labels: ["enhancement"]
|
||||
labels: ['enhancement']
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
|
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,4 +1,4 @@
|
||||
Please click the `Preview` tab and select the type of Pull Request you are submitting.
|
||||
# Please click the `Preview` tab and select the type of Pull Request you are submitting
|
||||
|
||||
- [Bug Fix](?expand=1&template=bugfix.md)
|
||||
- [Feature](?expand=1&template=feature.md)
|
||||
@ -9,5 +9,7 @@ Please click the `Preview` tab and select the type of Pull Request you are submi
|
||||
>
|
||||
> - [Translation Contribution](?expand=1&template=translation.md)
|
||||
|
||||
---
|
||||
|
||||
> [!CAUTION]
|
||||
> Any Pull Request that does not follow the above types will be rejected.
|
||||
|
24
.github/dependabot.yml
vendored
24
.github/dependabot.yml
vendored
@ -2,25 +2,25 @@
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
- package-ecosystem: 'npm'
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
interval: 'weekly'
|
||||
groups:
|
||||
dependencies:
|
||||
patterns: ["*"]
|
||||
patterns: ['*']
|
||||
labels:
|
||||
- "dependencies"
|
||||
- 'dependencies'
|
||||
pull-request-branch-name:
|
||||
separator: "-"
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
separator: '-'
|
||||
- package-ecosystem: 'github-actions'
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
interval: 'weekly'
|
||||
groups:
|
||||
actions:
|
||||
patterns: ["*"]
|
||||
patterns: ['*']
|
||||
labels:
|
||||
- "actions"
|
||||
- 'actions'
|
||||
pull-request-branch-name:
|
||||
separator: "-"
|
||||
separator: '-'
|
||||
|
6
.github/workflows/validate.yml
vendored
6
.github/workflows/validate.yml
vendored
@ -6,9 +6,9 @@ on:
|
||||
jobs:
|
||||
hacs:
|
||||
name: HACS Action
|
||||
runs-on: "ubuntu-latest"
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- name: HACS Action
|
||||
uses: "hacs/action@22.5.0"
|
||||
uses: 'hacs/action@22.5.0'
|
||||
with:
|
||||
category: "plugin"
|
||||
category: 'plugin'
|
||||
|
22
.markdownlint.jsonc
Normal file
22
.markdownlint.jsonc
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/DavidAnson/markdownlint/main/schema.json",
|
||||
"default": true,
|
||||
"MD013": {
|
||||
"line_length": 120,
|
||||
"code_block_line_length": 120,
|
||||
"heading_line_length": 80,
|
||||
"tables": false
|
||||
},
|
||||
"MD024": {
|
||||
"siblings_only": true
|
||||
},
|
||||
"MD033": {
|
||||
"allowed_elements": [
|
||||
"br",
|
||||
"summary",
|
||||
"details"
|
||||
]
|
||||
},
|
||||
"MD040": false,
|
||||
"MD046": false
|
||||
}
|
@ -132,7 +132,7 @@ Examples: fr, fr-CA, zh-Hans.
|
||||
state which language you are contributing to or updating.
|
||||
|
||||
!!! info
|
||||
**Integrating a new Translation:**
|
||||
**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`.
|
||||
|
@ -1,4 +1,4 @@
|
||||
Here is a full example using all the options provided with the strategy.
|
||||
# Full example using all the options provided with the strategy
|
||||
|
||||
```yaml
|
||||
strategy:
|
||||
|
@ -41,7 +41,7 @@ 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.
|
||||
|
||||
!!! 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
|
||||
|
||||
@ -49,7 +49,7 @@ By default, Home Assistant will notify you when an update of the strategy is ava
|
||||
You can update the strategy by going to `Settings` found at the bottom of the sidebar.
|
||||
|
||||
!!! tip
|
||||
You can enable notifications of pre-releases.
|
||||
You can enable notifications of pre-releases.
|
||||
|
||||
* Go to `Settings` > `Devices & services` > `Entities`.
|
||||
* Search for `Mushroom Dashboard` and switch on the `Pre-release` entity.
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Welcome to the Mushroom Strategy Documentation :material-mushroom:
|
||||
# Welcome to the Mushroom Strategy Documentation :material-mushroom:
|
||||
|
||||
[![Release][releaseBadge]][releaseUrl]
|
||||
[![HACS][hacsBadge]][hacsUrl]
|
||||
@ -51,17 +51,16 @@ engage with the community!
|
||||
**Enjoying the Mushroom Strategy?** Consider giving our project a
|
||||
:star: [star on GitHub](https://github.com/DigiLive/mushroom-strategy) and exploring ways
|
||||
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
|
||||
|
||||

|
||||
|
||||
??? note "Click here for more images..."
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
<!-- Badge References -->
|
||||
|
||||
@ -71,8 +70,6 @@ helps us grow and improve.
|
||||
|
||||
[releaseBadge]: https://img.shields.io/github/v/tag/digilive/mushroom-strategy?filter=v2.3.2&label=Release
|
||||
|
||||
[sponsorBadge]: https://img.shields.io/badge/Sponsor_him-%E2%9D%A4-%23db61a2.svg?&logo=github&color=%23fe8e86
|
||||
|
||||
<!-- Repository References -->
|
||||
|
||||
[releaseUrl]: https://github.com/DigiLive/mushroom-strategy/releases/tag/v2.3.2
|
||||
|
@ -90,7 +90,7 @@ views: []
|
||||
```
|
||||
|
||||
!!! note
|
||||
Area specific options take precedence over options set for all areas.!
|
||||
Area specific options take precedence over options set for all areas.!
|
||||
|
||||
<!-- References -->
|
||||
|
||||
|
@ -30,6 +30,6 @@ strategy:
|
||||
```
|
||||
|
||||
!!! tip
|
||||
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.
|
||||
The YAML can be found in the Raw configuration editor.
|
||||
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.
|
||||
The YAML can be found in the Raw configuration editor.
|
||||
|
@ -31,7 +31,7 @@ Use `_` as the identifier to set options for all domains.
|
||||
|
||||
## Example
|
||||
|
||||
```YAML
|
||||
```yaml
|
||||
strategy:
|
||||
type: custom:mushroom-strategy
|
||||
options:
|
||||
|
@ -53,7 +53,7 @@ home_view:
|
||||
```
|
||||
|
||||
!!! note
|
||||
Section specific options take precedence over options set for all sections.!
|
||||
Section specific options take precedence over options set for all sections.!
|
||||
|
||||
---
|
||||
|
||||
@ -83,7 +83,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.
|
||||
|
||||
!!! 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
|
||||
|
||||
@ -105,8 +105,8 @@ To add custom chips, you can configure them in `extra_chips`.
|
||||
See [Mushroom Chips][chipDocUrl]{: target="_blank"} for all available chips.
|
||||
|
||||
!!! tip
|
||||
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.
|
||||
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.
|
||||
|
||||
### Example
|
||||
|
||||
@ -139,9 +139,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).
|
||||
|
||||
!!! tip
|
||||
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.
|
||||
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.
|
||||
|
||||
### Example
|
||||
|
||||
@ -174,9 +174,9 @@ These cards will be shown below the areas.
|
||||
Each card can have the options as described at [Card Options](card-options.md).
|
||||
|
||||
!!! tip
|
||||
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.
|
||||
The YAML can be found in the Raw configuration editor.
|
||||
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.
|
||||
The YAML can be found in the Raw configuration editor.
|
||||
|
||||
#### Example
|
||||
|
||||
|
@ -54,8 +54,8 @@ 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"}.
|
||||
|
||||
!!! tip
|
||||
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.
|
||||
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.
|
||||
|
||||
### Example
|
||||
|
||||
|
@ -58,7 +58,7 @@ nav:
|
||||
|
||||
markdown_extensions:
|
||||
- toc:
|
||||
permalink: "#"
|
||||
permalink: '#'
|
||||
- admonition
|
||||
- pymdownx.superfences
|
||||
- pymdownx.details
|
||||
|
975
package-lock.json
generated
975
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -36,6 +36,7 @@
|
||||
"eslint-config-prettier": "^10.1.5",
|
||||
"eslint-plugin-prettier": "^5.4.0",
|
||||
"home-assistant-js-websocket": "^9.5.0",
|
||||
"markdownlint-cli2": "^0.18.1",
|
||||
"prettier": "^3.5.3",
|
||||
"superstruct": "^2.0.2",
|
||||
"ts-loader": "^9.5.2",
|
||||
@ -46,6 +47,9 @@
|
||||
"webpack-cli": "^6.0.1"
|
||||
},
|
||||
"scripts": {
|
||||
"mkdocs:serve": "mkdocs serve",
|
||||
"lint:md": "markdownlint-cli2 \"**/*.md\" \"#node_modules\"",
|
||||
"fix:md": "markdownlint-cli2 \"**/*.md\" \"#node_modules\" \"#dist\" \"#build\" --fix",
|
||||
"build-dev": "webpack --config webpack.dev.config.ts",
|
||||
"build": "webpack",
|
||||
"bump": "bump --preid alpha package.json package-lock.json README.md ./src/mushroom-strategy.ts"
|
||||
|
@ -1,3 +1,5 @@
|
||||
# Notice
|
||||
|
||||
This directory contains partial code from
|
||||
the [Home Assistant Frontend repository](https://github.com/home-assistant/frontend).
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
# Notice
|
||||
|
||||
This directory contains partial code from
|
||||
the [Lovelace Mushroom repository](https://github.com/piitaya/lovelace-mushroom).
|
||||
|
||||
|
@ -32,4 +32,4 @@
|
||||
"module": "CommonJS"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user