chore: drop HACS distribution and move CI to Gitea
The GitHub mirror is gone, so the HACS packaging and the GitHub-only CI no longer have anything to run against. Remove hacs.json and the .github/ workflow. Both of its jobs (hassfest and hacs/action) were gated on `github.server_url == 'https://github.com'` and are GitHub-hosted actions, so neither can run on the Gitea runner. Replace them with .gitea/workflows/ci.yml: - lint: ruff check + ruff format --check, version pinned because ruff's default rule set and formatter output move between releases - validate: byte-compile, then scripts/validate_integration.py, which covers the part of hassfest that matters for a manually installed custom component (manifest keys, domain/directory agreement, and translations matching strings.json key for key) README now documents manual installation only, and points at the local CI commands. manifest.json documentation and issue_tracker point at the Gitea repo; NOTICE keeps its upstream attribution. Adopting ruff surfaced two real defects, fixed here: - climate.async_set_hvac_mode raised HomeAssistantError for an unsupported mode from inside a try that catches Exception, so the message was re-wrapped as "Failed to set HVAC mode: Unsupported HVAC mode: ...". The validation is now hoisted above the try. - config_flow.async_step_reauth_confirm swallowed unexpected exceptions into a bare "unknown" error with no log, unlike the user step. It now logs via _LOGGER.exception. Remaining changes are mechanical: import ordering, docstrings on public methods, ClassVar on mutable class attributes, contextlib.suppress, and asyncio.TimeoutError -> TimeoutError (an alias since 3.11). The smoke test now reads the new DknCloudNaClient.socket_connected property rather than reaching into _socket. Co-authored-by: anthropic/claude-opus-5
This commit is contained in:
co-authored by
anthropic/claude-opus-5
parent
d6e935e8d7
commit
706580fab2
@@ -1,11 +1,8 @@
|
||||
# DKN Cloud NA — Home Assistant Integration
|
||||
|
||||
[![HACS][hacs-badge]][hacs-url]
|
||||
[![Validate][validate-badge]][validate-url]
|
||||
|
||||
Control your Daikin mini-split air conditioners through Home Assistant using the DKN Cloud NA cloud service.
|
||||
|
||||
This integration is a port of the [homebridge-dkncloudna](https://github.com/plecong/homebridge-dkncloudna) plugin by [@plecong](https://github.com/plecong), adapted for Home Assistant and distributed via HACS.
|
||||
This integration is a port of the [homebridge-dkncloudna](https://github.com/plecong/homebridge-dkncloudna) plugin by [@plecong](https://github.com/plecong), adapted for Home Assistant.
|
||||
|
||||
---
|
||||
|
||||
@@ -20,24 +17,18 @@ Any Daikin mini-split system connected to the **DKN Cloud NA** WiFi adapter (Nor
|
||||
- A working [DKN Cloud NA](https://dkncloudna.com) account
|
||||
- Your Daikin unit(s) already set up and visible in the DKN Cloud NA app
|
||||
- Home Assistant 2024.1 or later
|
||||
- HACS 2.0 or later
|
||||
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
||||
### Via HACS (recommended)
|
||||
This integration is installed manually — it is not published to HACS.
|
||||
|
||||
1. Open HACS in your Home Assistant instance
|
||||
2. Go to **Integrations**
|
||||
3. Click the **⋮** menu → **Custom repositories**
|
||||
4. Add `https://github.com/thatguygriff/homeassistant-dkncloudna` as an **Integration**
|
||||
5. Search for **DKN Cloud NA** and install it
|
||||
6. Restart Home Assistant
|
||||
1. Download or clone this repository
|
||||
2. Copy the `custom_components/dkncloudna/` directory into your Home Assistant `config/custom_components/` directory, so that you end up with `config/custom_components/dkncloudna/manifest.json`
|
||||
3. Restart Home Assistant
|
||||
|
||||
### Manual
|
||||
|
||||
Copy the `custom_components/dkncloudna/` directory into your Home Assistant `config/custom_components/` directory and restart.
|
||||
To upgrade, replace the `dkncloudna` directory with the newer copy and restart again.
|
||||
|
||||
---
|
||||
|
||||
@@ -84,12 +75,29 @@ Each device exposes the following entities:
|
||||
|
||||
---
|
||||
|
||||
## Development
|
||||
|
||||
CI runs on Gitea Actions (`.gitea/workflows/ci.yml`). To reproduce it locally:
|
||||
|
||||
```sh
|
||||
pip install ruff==0.16.8 # version is pinned in CI
|
||||
ruff check .
|
||||
ruff format --check .
|
||||
python3 scripts/validate_integration.py
|
||||
```
|
||||
|
||||
`scripts/validate_integration.py` checks that every JSON file parses, that
|
||||
`manifest.json` has the keys Home Assistant requires of a custom integration,
|
||||
and that each file in `translations/` has the same key structure as
|
||||
`strings.json`.
|
||||
|
||||
`smoke-test/run.sh` exercises the client against a real DKN Cloud NA account.
|
||||
It needs a `.env` with `DKN_CLOUD_NA_EMAIL` and `DKN_CLOUD_NA_PASSWORD` (see
|
||||
`.env.example`) and is run by hand, not in CI.
|
||||
|
||||
---
|
||||
|
||||
## Credits
|
||||
|
||||
- Original Homebridge plugin: [homebridge-dkncloudna](https://github.com/plecong/homebridge-dkncloudna) by [@plecong](https://github.com/plecong)
|
||||
- EU counterpart inspiration: [DKNCloud-HASS](https://github.com/eXPerience83/DKNCloud-HASS) by [@eXPerience83](https://github.com/eXPerience83)
|
||||
|
||||
[hacs-badge]: https://img.shields.io/badge/HACS-Custom-orange.svg
|
||||
[hacs-url]: https://github.com/hacs/integration
|
||||
[validate-badge]: https://github.com/lavoiesl/homeassistant-dkncloudna/actions/workflows/validate.yml/badge.svg
|
||||
[validate-url]: https://github.com/lavoiesl/homeassistant-dkncloudna/actions/workflows/validate.yml
|
||||
|
||||
Reference in New Issue
Block a user