From fb51215d25a9d634cc5739735335022feb26d674 Mon Sep 17 00:00:00 2001 From: Keith Baker Date: Fri, 19 Apr 2024 10:16:23 -0400 Subject: [PATCH 1/4] try enabling hassfest for this integration --- .github/workflows/hassfest.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/hassfest.yaml diff --git a/.github/workflows/hassfest.yaml b/.github/workflows/hassfest.yaml new file mode 100644 index 0000000..07d1dda --- /dev/null +++ b/.github/workflows/hassfest.yaml @@ -0,0 +1,14 @@ +name: Validate with hassfest + +on: + push: + pull_request: + schedule: + - cron: "0 0 * * *" + +jobs: + validate: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v3" + - uses: home-assistant/actions/hassfest@master From 47d836652fc7045e56d65ca9fe83cf714e9ba233 Mon Sep 17 00:00:00 2001 From: Keith Baker Date: Fri, 19 Apr 2024 10:21:27 -0400 Subject: [PATCH 2/4] resolve missing iot_class issue flagged by hassfest --- custom_components/sunpower/manifest.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/sunpower/manifest.json b/custom_components/sunpower/manifest.json index ecf56e9..72e7803 100644 --- a/custom_components/sunpower/manifest.json +++ b/custom_components/sunpower/manifest.json @@ -10,5 +10,6 @@ "homekit": {}, "dependencies": [], "codeowners": ["@krbaker"], - "issue_tracker": "https://github.com/krbaker/hass-sunpower/issues" + "issue_tracker": "https://github.com/krbaker/hass-sunpower/issues", + "iot_class": "cloud_polling" } From 66a780a9292f92febbcf9b06efc56ed1515e02de Mon Sep 17 00:00:00 2001 From: Keith Baker Date: Fri, 19 Apr 2024 10:27:38 -0400 Subject: [PATCH 3/4] reorder manifest to match hassfest requirements --- custom_components/sunpower/manifest.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/custom_components/sunpower/manifest.json b/custom_components/sunpower/manifest.json index 72e7803..85a513a 100644 --- a/custom_components/sunpower/manifest.json +++ b/custom_components/sunpower/manifest.json @@ -1,15 +1,15 @@ { - "version": "2024.4.2", "domain": "sunpower", "name": "sunpower", + "codeowners": ["@krbaker"], "config_flow": true, + "dependencies": [], "documentation": "https://github.com/krbaker/hass-sunpower", + "homekit": {}, + "iot_class": "cloud_polling" + "issue_tracker": "https://github.com/krbaker/hass-sunpower/issues", "requirements": ["requests"], "ssdp": [], + "version": "2024.4.2", "zeroconf": [], - "homekit": {}, - "dependencies": [], - "codeowners": ["@krbaker"], - "issue_tracker": "https://github.com/krbaker/hass-sunpower/issues", - "iot_class": "cloud_polling" } From 2eefb767cd2149567ddf409d35c517417976e764 Mon Sep 17 00:00:00 2001 From: Keith Baker Date: Fri, 19 Apr 2024 10:40:09 -0400 Subject: [PATCH 4/4] fix json syntax and add pre-commit json checker --- .pre-commit-config.yaml | 2 ++ custom_components/sunpower/manifest.json | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 89c66ac..c8e920d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,6 +33,8 @@ repos: - id: check-yaml + - id: check-json + - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.39.0 hooks: diff --git a/custom_components/sunpower/manifest.json b/custom_components/sunpower/manifest.json index 85a513a..ad7282e 100644 --- a/custom_components/sunpower/manifest.json +++ b/custom_components/sunpower/manifest.json @@ -6,10 +6,10 @@ "dependencies": [], "documentation": "https://github.com/krbaker/hass-sunpower", "homekit": {}, - "iot_class": "cloud_polling" + "iot_class": "cloud_polling", "issue_tracker": "https://github.com/krbaker/hass-sunpower/issues", "requirements": ["requests"], "ssdp": [], "version": "2024.4.2", - "zeroconf": [], + "zeroconf": [] }