From 5e5db0d17fe6519de74c5a35ab87a8aed543346c Mon Sep 17 00:00:00 2001 From: Max R Date: Sun, 28 Jun 2026 17:11:30 -0400 Subject: [PATCH 1/2] apply --- .github/workflows/matchers/python.json | 2 +- .gitignore | 1 - .gitpod.Dockerfile | 2 +- .pre-commit-config.yaml | 21 +++++ .trunk/.gitignore | 1 - .trunk/trunk.yaml | 14 ---- README.md | 11 +-- custom_components/vesync/manifest.json | 54 ++++++------- custom_components/vesync/strings.json | 78 +++++++++---------- custom_components/vesync/translations/bg.json | 2 +- custom_components/vesync/translations/ca.json | 2 +- custom_components/vesync/translations/cs.json | 2 +- custom_components/vesync/translations/da.json | 2 +- custom_components/vesync/translations/de.json | 2 +- custom_components/vesync/translations/el.json | 2 +- custom_components/vesync/translations/en.json | 12 +-- .../vesync/translations/es-419.json | 2 +- custom_components/vesync/translations/es.json | 2 +- custom_components/vesync/translations/et.json | 2 +- custom_components/vesync/translations/fr.json | 2 +- custom_components/vesync/translations/he.json | 2 +- custom_components/vesync/translations/hu.json | 2 +- custom_components/vesync/translations/id.json | 2 +- custom_components/vesync/translations/it.json | 2 +- custom_components/vesync/translations/ja.json | 2 +- custom_components/vesync/translations/ko.json | 2 +- custom_components/vesync/translations/lb.json | 2 +- custom_components/vesync/translations/lv.json | 2 +- custom_components/vesync/translations/nl.json | 2 +- custom_components/vesync/translations/no.json | 2 +- custom_components/vesync/translations/pl.json | 2 +- .../vesync/translations/pt-BR.json | 2 +- custom_components/vesync/translations/pt.json | 2 +- custom_components/vesync/translations/ru.json | 2 +- custom_components/vesync/translations/sk.json | 2 +- custom_components/vesync/translations/sl.json | 2 +- custom_components/vesync/translations/sv.json | 2 +- custom_components/vesync/translations/tr.json | 2 +- custom_components/vesync/translations/uk.json | 2 +- .../vesync/translations/zh-Hans.json | 2 +- .../vesync/translations/zh-Hant.json | 2 +- hacs.json | 8 +- 42 files changed, 134 insertions(+), 132 deletions(-) delete mode 100644 .trunk/.gitignore delete mode 100644 .trunk/trunk.yaml diff --git a/.github/workflows/matchers/python.json b/.github/workflows/matchers/python.json index 1052a1c..9c3095c 100644 --- a/.github/workflows/matchers/python.json +++ b/.github/workflows/matchers/python.json @@ -15,4 +15,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/.gitignore b/.gitignore index 3de4118..dce15c5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,4 @@ .vscode/** **/__pycache__/** Config/** -.trunk/logs /.project diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 03baf33..6d57c5f 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -1,4 +1,4 @@ -# trunk-ignore(hadolint/DL3007) +# hadolint ignore=DL3007 FROM gitpod/workspace-full:latest USER gitpod diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 62a86f3..cd538d9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,3 +38,24 @@ repos: rev: v1.29.0 hooks: - id: yamllint + - repo: https://github.com/rhysd/actionlint + rev: v1.7.12 + hooks: + - id: actionlint + - repo: https://github.com/gitleaks/gitleaks + rev: v8.30.0 + hooks: + - id: gitleaks + - repo: https://github.com/shenxianpeng/hadolint-pre-commit + rev: v2.14.0.1 + hooks: + - id: hadolint + - repo: https://github.com/igorshubovych/markdownlint-cli + rev: v0.49.0 + hooks: + - id: markdownlint + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: pretty-format-json + args: [--autofix, '--indent=4', --no-sort-keys] diff --git a/.trunk/.gitignore b/.trunk/.gitignore deleted file mode 100644 index 7feb17f..0000000 --- a/.trunk/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*out diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml deleted file mode 100644 index 20e956d..0000000 --- a/.trunk/trunk.yaml +++ /dev/null @@ -1,14 +0,0 @@ -version: 0.1 -cli: - version: 0.15.0-beta -lint: - enabled: - - actionlint@1.6.9 - - black@22.3.0 - - flake8@4.0.1 - - gitleaks@8.3.0 - - hadolint@2.8.0 - - isort@5.9.3 - - markdownlint@0.31.1 - - prettier@2.5.1 - - taplo@release-cli-0.6.0 diff --git a/README.md b/README.md index 577b67b..9807383 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,9 @@ -# **Important message** -> -> This a fork of the archived project created by [vlebourl](https://github.com/vlebourl/custom_vesync), and previously maintained by [micahqcade](https://github.com/micahqcade/). Please contribute here. +# VeSync custom component for Home Assistant - [![GitHub release](https://img.shields.io/github/v/release/haext/custom_vesync.svg)](https://GitHub.com/haext/custom_vesync/releases/) -# VeSync custom component for Home Assistant +> **Important:** This a fork of the archived project created by [vlebourl](https://github.com/vlebourl/custom_vesync), and previously maintained by [micahqcade](https://github.com/micahqcade/). Please contribute here. Custom component for Home Assistant to interact with smart devices via the VeSync platform. This integration is heavily based on [VeSync_bpo](https://github.com/borpin/vesync-bpo) and relies on [pyvesync](https://github.com/webdjoe/pyvesync) under the hood. @@ -21,7 +18,7 @@ This integration will override the core VeSync integration. [![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=haext&repository=custom_vesync&category=integration) -This integration can be installed by adding this repository to HACS __AS A CUSTOM REPOSITORY__, then searching for `Custom VeSync`, and choosing install. Reboot Home Assistant and configure the 'VeSync' integration via the integrations page or press the blue button below. +This integration can be installed by adding this repository to HACS **AS A CUSTOM REPOSITORY**, then searching for `Custom VeSync`, and choosing install. Reboot Home Assistant and configure the 'VeSync' integration via the integrations page or press the blue button below. [![Open your Home Assistant instance and start setting up a new integration.](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start/?domain=vesync) @@ -59,7 +56,7 @@ logger: ## TODO LIST -``` +```markdown - [x] Air Fryer Properties (AirFryer158) - [ ] Air Fryer Methods - [ ] Create the Card diff --git a/custom_components/vesync/manifest.json b/custom_components/vesync/manifest.json index 34db743..980e1c1 100644 --- a/custom_components/vesync/manifest.json +++ b/custom_components/vesync/manifest.json @@ -1,29 +1,29 @@ { - "domain": "vesync", - "name": "VeSync", - "codeowners": [ - "@markperdue", - "@webdjoe", - "@thegardenmonkey", - "@vlebourl", - "@tv4you2016", - "@gdgib" - ], - "config_flow": true, - "dhcp": [ - { - "hostname": "levoit-*", - "macaddress": "*" - } - ], - "documentation": "https://github.com/haext/custom_vesync", - "iot_class": "cloud_polling", - "issue_tracker": "https://github.com/haext/custom_vesync/issues", - "loggers": [ - "pyvesync" - ], - "requirements": [ - "pyvesync==2.1.15" - ], - "version": "1.4.0" + "domain": "vesync", + "name": "VeSync", + "codeowners": [ + "@markperdue", + "@webdjoe", + "@thegardenmonkey", + "@vlebourl", + "@tv4you2016", + "@gdgib" + ], + "config_flow": true, + "dhcp": [ + { + "hostname": "levoit-*", + "macaddress": "*" + } + ], + "documentation": "https://github.com/haext/custom_vesync", + "iot_class": "cloud_polling", + "issue_tracker": "https://github.com/haext/custom_vesync/issues", + "loggers": [ + "pyvesync" + ], + "requirements": [ + "pyvesync==2.1.15" + ], + "version": "1.4.0" } diff --git a/custom_components/vesync/strings.json b/custom_components/vesync/strings.json index 90ed134..25344cd 100644 --- a/custom_components/vesync/strings.json +++ b/custom_components/vesync/strings.json @@ -1,46 +1,46 @@ { - "title": "VeSync Integration for Home Assistant", - "device_automation": { - "action_type": { - "set_mode": "Change mode on {entity_name}" - } - }, - "config": { - "flow_title": "Gateway: {gateway_id}", - "step": { - "user": { - "title": "VeSync Integration for Home Assistant", - "description": "Custom component for Home Assistant to interact with smart devices via the VeSync platform.", - "data": { - "username": "[%key:common::config_flow::data::email%]", - "password": "[%key:common::config_flow::data::password%]", - "polling_interval": "Polling interval (seconds)" - } - }, - "reauth_confirm": { - "title": "Reauthenticate with your VeSync credentials", - "data": { - "username": "[%key:common::config_flow::data::email%]", - "password": "[%key:common::config_flow::data::password%]", - "polling_interval": "Polling interval (seconds)" + "title": "VeSync Integration for Home Assistant", + "device_automation": { + "action_type": { + "set_mode": "Change mode on {entity_name}" } - } }, - "error": { - "invalid_auth": "[%key:common::config_flow::error::invalid_auth%]" + "config": { + "flow_title": "Gateway: {gateway_id}", + "step": { + "user": { + "title": "VeSync Integration for Home Assistant", + "description": "Custom component for Home Assistant to interact with smart devices via the VeSync platform.", + "data": { + "username": "[%key:common::config_flow::data::email%]", + "password": "[%key:common::config_flow::data::password%]", + "polling_interval": "Polling interval (seconds)" + } + }, + "reauth_confirm": { + "title": "Reauthenticate with your VeSync credentials", + "data": { + "username": "[%key:common::config_flow::data::email%]", + "password": "[%key:common::config_flow::data::password%]", + "polling_interval": "Polling interval (seconds)" + } + } + }, + "error": { + "invalid_auth": "[%key:common::config_flow::error::invalid_auth%]" + }, + "abort": { + "already_configured": "VeSync account is already configured", + "reauth_successful": "Reauthentication was successful" + } }, - "abort": { - "already_configured": "VeSync account is already configured", - "reauth_successful": "Reauthentication was successful" - } - }, - "options": { - "step": { - "vesync_options": { - "data": { - "polling_interval": "Polling interval (seconds)" + "options": { + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds)" + } + } } - } } - } } diff --git a/custom_components/vesync/translations/bg.json b/custom_components/vesync/translations/bg.json index ddfc129..4a10e57 100644 --- a/custom_components/vesync/translations/bg.json +++ b/custom_components/vesync/translations/bg.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/ca.json b/custom_components/vesync/translations/ca.json index b278361..4b48e00 100644 --- a/custom_components/vesync/translations/ca.json +++ b/custom_components/vesync/translations/ca.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/cs.json b/custom_components/vesync/translations/cs.json index 4e4a1f1..9a51b80 100644 --- a/custom_components/vesync/translations/cs.json +++ b/custom_components/vesync/translations/cs.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/da.json b/custom_components/vesync/translations/da.json index 89b1fd5..4c2cd6f 100644 --- a/custom_components/vesync/translations/da.json +++ b/custom_components/vesync/translations/da.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/de.json b/custom_components/vesync/translations/de.json index 3dd00fa..fb3928b 100644 --- a/custom_components/vesync/translations/de.json +++ b/custom_components/vesync/translations/de.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/el.json b/custom_components/vesync/translations/el.json index 39953d8..9238c61 100644 --- a/custom_components/vesync/translations/el.json +++ b/custom_components/vesync/translations/el.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/en.json b/custom_components/vesync/translations/en.json index 15b296f..65176cd 100644 --- a/custom_components/vesync/translations/en.json +++ b/custom_components/vesync/translations/en.json @@ -32,12 +32,12 @@ } }, "options": { - "step": { - "vesync_options": { - "data": { - "polling_interval": "Polling interval (seconds)" - } + "step": { + "vesync_options": { + "data": { + "polling_interval": "Polling interval (seconds)" + } + } } - } } } diff --git a/custom_components/vesync/translations/es-419.json b/custom_components/vesync/translations/es-419.json index 486ffa9..7301d5b 100644 --- a/custom_components/vesync/translations/es-419.json +++ b/custom_components/vesync/translations/es-419.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/es.json b/custom_components/vesync/translations/es.json index 38ba8d2..f6c8abb 100644 --- a/custom_components/vesync/translations/es.json +++ b/custom_components/vesync/translations/es.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/et.json b/custom_components/vesync/translations/et.json index 6abb04a..a078382 100644 --- a/custom_components/vesync/translations/et.json +++ b/custom_components/vesync/translations/et.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/fr.json b/custom_components/vesync/translations/fr.json index 4884e75..feebcdc 100644 --- a/custom_components/vesync/translations/fr.json +++ b/custom_components/vesync/translations/fr.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/he.json b/custom_components/vesync/translations/he.json index 61cad54..3fd2516 100644 --- a/custom_components/vesync/translations/he.json +++ b/custom_components/vesync/translations/he.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/hu.json b/custom_components/vesync/translations/hu.json index 9c2c666..ca8472c 100644 --- a/custom_components/vesync/translations/hu.json +++ b/custom_components/vesync/translations/hu.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/id.json b/custom_components/vesync/translations/id.json index 2e81655..51b226a 100644 --- a/custom_components/vesync/translations/id.json +++ b/custom_components/vesync/translations/id.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/it.json b/custom_components/vesync/translations/it.json index 5f75223..e4307e0 100644 --- a/custom_components/vesync/translations/it.json +++ b/custom_components/vesync/translations/it.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/ja.json b/custom_components/vesync/translations/ja.json index 1ef25d1..3288e37 100644 --- a/custom_components/vesync/translations/ja.json +++ b/custom_components/vesync/translations/ja.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/ko.json b/custom_components/vesync/translations/ko.json index 521288a..e5b3806 100644 --- a/custom_components/vesync/translations/ko.json +++ b/custom_components/vesync/translations/ko.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/lb.json b/custom_components/vesync/translations/lb.json index c972b3b..79635c0 100644 --- a/custom_components/vesync/translations/lb.json +++ b/custom_components/vesync/translations/lb.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/lv.json b/custom_components/vesync/translations/lv.json index 891e35d..aff0fb0 100644 --- a/custom_components/vesync/translations/lv.json +++ b/custom_components/vesync/translations/lv.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/nl.json b/custom_components/vesync/translations/nl.json index 602ef75..d0d2d5b 100644 --- a/custom_components/vesync/translations/nl.json +++ b/custom_components/vesync/translations/nl.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/no.json b/custom_components/vesync/translations/no.json index 8a4d49b..d40e87b 100644 --- a/custom_components/vesync/translations/no.json +++ b/custom_components/vesync/translations/no.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/pl.json b/custom_components/vesync/translations/pl.json index 07b40ec..7720313 100644 --- a/custom_components/vesync/translations/pl.json +++ b/custom_components/vesync/translations/pl.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/pt-BR.json b/custom_components/vesync/translations/pt-BR.json index 0387306..b59039b 100644 --- a/custom_components/vesync/translations/pt-BR.json +++ b/custom_components/vesync/translations/pt-BR.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/pt.json b/custom_components/vesync/translations/pt.json index 9d48b49..9e4d198 100644 --- a/custom_components/vesync/translations/pt.json +++ b/custom_components/vesync/translations/pt.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/ru.json b/custom_components/vesync/translations/ru.json index b943694..0215f9b 100644 --- a/custom_components/vesync/translations/ru.json +++ b/custom_components/vesync/translations/ru.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/sk.json b/custom_components/vesync/translations/sk.json index a4ceb40..2d1d985 100644 --- a/custom_components/vesync/translations/sk.json +++ b/custom_components/vesync/translations/sk.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/sl.json b/custom_components/vesync/translations/sl.json index 0421df7..23c9d83 100644 --- a/custom_components/vesync/translations/sl.json +++ b/custom_components/vesync/translations/sl.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/sv.json b/custom_components/vesync/translations/sv.json index 324f754..eabdcbc 100644 --- a/custom_components/vesync/translations/sv.json +++ b/custom_components/vesync/translations/sv.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/tr.json b/custom_components/vesync/translations/tr.json index 62f89f3..6f4312e 100644 --- a/custom_components/vesync/translations/tr.json +++ b/custom_components/vesync/translations/tr.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/uk.json b/custom_components/vesync/translations/uk.json index 0adfbaf..332db27 100644 --- a/custom_components/vesync/translations/uk.json +++ b/custom_components/vesync/translations/uk.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/zh-Hans.json b/custom_components/vesync/translations/zh-Hans.json index 4d4f6fe..855d3f4 100644 --- a/custom_components/vesync/translations/zh-Hans.json +++ b/custom_components/vesync/translations/zh-Hans.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/custom_components/vesync/translations/zh-Hant.json b/custom_components/vesync/translations/zh-Hant.json index e85e105..83f3a7d 100644 --- a/custom_components/vesync/translations/zh-Hant.json +++ b/custom_components/vesync/translations/zh-Hant.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/hacs.json b/hacs.json index f497a6e..31c44ed 100644 --- a/hacs.json +++ b/hacs.json @@ -1,6 +1,6 @@ { - "name": "Custom VeSync", - "homeassistant": "2024.12.0b0", - "zip_release": true, - "filename": "vesync.zip" + "name": "Custom VeSync", + "homeassistant": "2024.12.0b0", + "zip_release": true, + "filename": "vesync.zip" } From b3f1d3c25bd06c07f412239afd5bc7af7b2e552b Mon Sep 17 00:00:00 2001 From: Max R Date: Mon, 29 Jun 2026 07:41:31 -0400 Subject: [PATCH 2/2] Remove Prettier extension from Gitpod config --- .gitpod.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index e238786..5246c01 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -23,7 +23,6 @@ github: addBadge: false vscode: extensions: - - esbenp.prettier-vscode - github.vscode-pull-request-github - eamodio.gitlens - ms-python.python