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 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..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", - "config_flow": true, - "documentation": "https://www.home-assistant.io/integrations/touchline", - "requirements": [ - "pytouchline_extended==1.1.2" - ], "codeowners": [], + "config_flow": true, + "documentation": "https://github.com/hackmann/hass-touchline", + "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" }