diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 1c562b4..245ad5b 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -10,12 +10,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: home-assistant/actions/hassfest@master - hacs: - runs-on: ubuntu-latest - steps: - - uses: hacs/action@main - with: - category: integration tests: runs-on: ubuntu-latest steps: diff --git a/README.md b/README.md index 6606743..98d798b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Baby Tracker for Home Assistant -An unofficial [HACS](https://hacs.xyz) integration that connects Home Assistant to the +An unofficial integration that connects Home Assistant to the sync group of the Baby Tracker app (`com.nighp.babytracker_android`). You can see your baby's log in Home Assistant and add to it, and entries sync with the app on your other devices. @@ -21,19 +21,27 @@ engineered from version 4.53 of the Android app. ## Install -### With HACS - -The repository has to be public on GitHub. Before publishing it, replace -`YOUR_GITHUB_USERNAME` in `custom_components/babytracker/manifest.json`. - -1. In HACS, open the menu and choose **Custom repositories**. -2. Add the repository URL, with the type **Integration**. -3. Find **Baby Tracker** in HACS, download it, and restart Home Assistant. - ### By hand -Copy `custom_components/babytracker` into the `custom_components` folder of your Home -Assistant configuration, then restart. +From a terminal on the Home Assistant machine, in your configuration folder (usually +`/config`), run this and then restart Home Assistant. Run it again to update. + +```bash +mkdir -p custom_components && rm -rf custom_components/babytracker && curl -fsSL https://git.asw.io/arne/ha-babytracker/archive/main.tar.gz | tar xz --strip-components=2 -C custom_components ha-babytracker/custom_components/babytracker +``` + +You can also copy `custom_components/babytracker` over yourself, for example with the +Samba or File editor add-ons. + +### With HACS + +HACS can only install from GitHub, so it can't use the repository at `git.asw.io` directly. +To use HACS, mirror this repository to a public GitHub repository, which Gitea can do +automatically under **Settings → Repository → Mirror settings**. Then: + +1. In HACS, open the menu and choose **Custom repositories**. +2. Add the **GitHub** URL, with the type **Integration**. +3. Find **Baby Tracker** in HACS, download it, and restart Home Assistant. ### Set it up @@ -230,5 +238,5 @@ python3 -m unittest discover -s tests The tests use a mock server written from the same analysis of the app. The integration's tests run against small stand-ins for Home Assistant's APIs in `tests/ha_stubs`, so they -don't show that it works in real Home Assistant. The GitHub workflow adds Home Assistant's -`hassfest` and the HACS validation. +don't show that it works in real Home Assistant. The workflow in `.github/workflows`, which +Gitea Actions also reads, adds Home Assistant's `hassfest`. diff --git a/custom_components/babytracker/manifest.json b/custom_components/babytracker/manifest.json index d8a4094..6268362 100644 --- a/custom_components/babytracker/manifest.json +++ b/custom_components/babytracker/manifest.json @@ -1,12 +1,12 @@ { "domain": "babytracker", "name": "Baby Tracker", - "codeowners": ["@YOUR_GITHUB_USERNAME"], + "codeowners": ["@arne"], "config_flow": true, - "documentation": "https://github.com/YOUR_GITHUB_USERNAME/babytracker-api", + "documentation": "https://git.asw.io/arne/ha-babytracker", "integration_type": "service", "iot_class": "cloud_polling", - "issue_tracker": "https://github.com/YOUR_GITHUB_USERNAME/babytracker-api/issues", + "issue_tracker": "https://git.asw.io/arne/ha-babytracker/issues", "requirements": ["requests>=2.25"], "version": "0.1.0" }