Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ jobs:
- name: Fetch HA pyproject
id: core-version
run: wget -O ha_pyproject.toml "https://raw.githubusercontent.com/home-assistant/core/refs/heads/dev/pyproject.toml"
- name: Core dependencies
id: core-dependencies-1
run: sudo apt-get update
- name: Core dependencies
id: core-dependencies-2
run: sudo apt-get install python3-pip python3-dev python3-venv autoconf libssl-dev libxml2-dev libxslt1-dev libjpeg-dev libffi-dev libudev-dev zlib1g-dev pkg-config libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev ffmpeg libgammu-dev build-essential
- name: Compute cache key
id: set-key
run: echo "cache-key=${{ runner.os }}--${{ env.CACHE_VERSION }}-${{ hashFiles('pyproject.toml', 'requirements_test.txt', '.pre-commit-config.yaml', 'ha_pyproject.toml') }}" >> "$GITHUB_OUTPUT"
Expand Down
12 changes: 10 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,22 @@ repos:
- id: yamllint
name: "Linting yaml"
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
rev: v0.11.0.1
hooks:
- id: shellcheck
name: "Shell checking"
args:
- --external-sources
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.7.4
hooks:
- id: prettier
additional_dependencies:
- [email protected]
- [email protected]
name: "Prettier (JSON sorting)"
- repo: https://github.com/biomejs/pre-commit
rev: v2.3.11
rev: v2.3.10
hooks:
- id: biome-lint
additional_dependencies: ["@biomejs/[email protected]"]
Expand Down
6 changes: 5 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
custom_components/plugwise/manifest.json
*.md
*.yaml
tests
.github
.prettierrc.js
24 changes: 24 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/** @type {import("prettier").Config} */
module.exports = {
overrides: [
{
files: "./custom_components/**/*.json",
options: {
plugins: [require.resolve("prettier-plugin-sort-json")],
jsonRecursiveSort: true,
jsonSortOrder: JSON.stringify({ [/.*/]: "numeric" }),
},
},
{
files: ["manifest.json", "./**/brands/*.json"],
options: {
// domain and name should stay at the top
jsonSortOrder: JSON.stringify({
domain: null,
name: null,
[/.*/]: "numeric",
}),
},
},
],
};
12 changes: 6 additions & 6 deletions custom_components/plugwise/icons.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@
"dhw_mode": {
"default": "mdi:shower",
"state": {
"auto": "mdi:auto-mode",
"boost": "mdi:rocket-launch",
"comfort": "mdi:sofa",
"eco": "mdi:leaf",
"off": "mdi:circle-off-outline",
"boost": "mdi:rocket-launch",
"auto": "mdi:auto-mode"
"off": "mdi:circle-off-outline"
}
},
"gateway_mode": {
Expand All @@ -84,11 +84,11 @@
"regulation_mode": {
"default": "mdi:hvac",
"state": {
"bleeding_hot": "mdi:fire-circle",
"bleeding_cold": "mdi:water-circle",
"off": "mdi:circle-off-outline",
"bleeding_hot": "mdi:fire-circle",
"cooling": "mdi:snowflake",
"heating": "mdi:radiator",
"cooling": "mdi:snowflake"
"off": "mdi:circle-off-outline"
}
},
"select_schedule": {
Expand Down
Loading
Loading