From 04ece51e0082c459cc1ac8b75f1a8c5ba8779662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hack=20Kampbj=C3=B8rn?= Date: Tue, 9 Jun 2026 13:44:42 +0200 Subject: [PATCH 1/3] feat: enable HomeAssistant's hassfest validation --- .github/workflows/hassfest.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/hassfest.yml diff --git a/.github/workflows/hassfest.yml b/.github/workflows/hassfest.yml new file mode 100644 index 0000000..5dfe730 --- /dev/null +++ b/.github/workflows/hassfest.yml @@ -0,0 +1,14 @@ +# https://developers.home-assistant.io/blog/2020/04/16/hassfest/ +name: Validate with HomeAssistant's hassfest +on: + push: + pull_request: + schedule: + - cron: "42 1 28 * *" + +jobs: + validate: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v3" + - uses: home-assistant/actions/hassfest@master From 3e076ac25043695049dfb6b0ccb62501731ba4b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hack=20Kampbj=C3=B8rn?= Date: Tue, 9 Jun 2026 14:12:56 +0200 Subject: [PATCH 2/3] feat: document this custom component and reference it from manifest --- README.md | 13 ++++++++++++- custom_components/touchline/__init__.py | 3 +++ custom_components/touchline/manifest.json | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 66edd99..36ba697 100644 --- a/README.md +++ b/README.md @@ -1 +1,12 @@ -Home Assistant custom component using pytouchline_extended lib. \ No newline at end of file + +# Custom Home Assistant component for Roth Touchline + +This component overrides the bundled [touchline][1] component in Home Assistant. + +### Why this is better than the bundled integration +- **Modern Configuration:** Supports Home Assistant's UI-based configuration (Config Flow), eliminating the need to edit `configuration.yaml` manually. +- **Asynchronous Execution:** Built using `asyncio`, ensuring that it doesn't block the Home Assistant main thread during network operations, leading to better overall performance and stability. +- **Enhanced Library:** Uses `pytouchline_extended`, providing improved communication with Roth Touchline devices. +- **Seamless Override:** Automatically takes precedence over the built-in integration while maintaining the same `touchline` domain. + +[1]: https://www.home-assistant.io/integrations/touchline diff --git a/custom_components/touchline/__init__.py b/custom_components/touchline/__init__.py index 9719acd..07ca0d6 100644 --- a/custom_components/touchline/__init__.py +++ b/custom_components/touchline/__init__.py @@ -4,6 +4,7 @@ from typing import override +import homeassistant.helpers.config_validation as cv from homeassistant import config_entries from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_HOST, Platform @@ -20,6 +21,8 @@ PLATFORMS = [Platform.CLIMATE] +CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN) + async def _async_import(hass: HomeAssistant, base_config: ConfigType) -> None: """Import a config entry from configuration.yaml.""" diff --git a/custom_components/touchline/manifest.json b/custom_components/touchline/manifest.json index 0577b65..69700e4 100644 --- a/custom_components/touchline/manifest.json +++ b/custom_components/touchline/manifest.json @@ -4,7 +4,7 @@ "version": "0.1.3", "integration_type": "hub", "config_flow": true, - "documentation": "https://www.home-assistant.io/integrations/touchline", + "documentation": "https://github.com/hackmann/hass-touchline", "requirements": [ "pytouchline_extended==1.1.2" ], From b29b4291e28b1d55d8d09ed32e51ebd16248f850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hack=20Kampbj=C3=B8rn?= Date: Tue, 9 Jun 2026 14:16:22 +0200 Subject: [PATCH 3/3] fix: sort manifest.json addresses `R] [MANIFEST] Manifest keys are not sorted correctly: domain, name, then alphabetical order` error from hassfest --- custom_components/touchline/manifest.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/custom_components/touchline/manifest.json b/custom_components/touchline/manifest.json index 69700e4..6030f4a 100644 --- a/custom_components/touchline/manifest.json +++ b/custom_components/touchline/manifest.json @@ -1,17 +1,17 @@ { "domain": "touchline", "name": "Roth Touchline", - "version": "0.1.3", - "integration_type": "hub", + "codeowners": [], "config_flow": true, "documentation": "https://github.com/hackmann/hass-touchline", - "requirements": [ - "pytouchline_extended==1.1.2" - ], - "codeowners": [], + "integration_type": "hub", "iot_class": "local_polling", "issue_tracker": "https://github.com/hackmann/hass-touchline/issues", "loggers": [ "pytouchline" - ] + ], + "requirements": [ + "pytouchline_extended==1.1.2" + ], + "version": "0.1.3" }