diff --git a/.claude/skills/release/SKILL.md b/.claude/skills/release/SKILL.md index 4b8c4b9..4d14dac 100644 --- a/.claude/skills/release/SKILL.md +++ b/.claude/skills/release/SKILL.md @@ -28,24 +28,24 @@ Follow MAINTAINING.md → "Releasing", and the principles in `CLAUDE.md`. The ru | .venv/bin/python -c 'import sys; from packaging.version import Version; print(max(sys.stdin.read().split(), key=Version))' jq -r '.requirements[]' custom_components/hive/manifest.json ``` - If it's newer than the pin, run `/bump-pyhive` for it first, and get that merged to `master`, unless the user decides to skip it. Check for an open `deps/pyhive-integration-*` PR before starting a new one. - - **Stable:** the pin must not be a pre-release. If `master` pins a pyhive beta, stop: either wait for a stable pyhive, or move the pin to the latest stable with `/bump-pyhive` first. + If it's newer than the pin, run `/bump-pyhive` for it first, and get that merged to `dev`, unless the user decides to skip it. Check for an open `deps/pyhive-integration-*` PR before starting a new one. + - **Stable:** the pin must not be a pre-release. If `dev` pins a pyhive beta, stop: either wait for a stable pyhive, or move the pin to the latest stable with `/bump-pyhive` first. 3. **Check it's safe to ship.** - - `gh run list -w ci.yml -b master -L 1` and `gh run list -w compat.yml -L 1` must both be green. If either is red, stop and report. For a red Compatibility run, suggest `/triage-compat`. + - `gh run list -w ci.yml -b dev -L 1` and `gh run list -w compat.yml -L 1` must both be green. If either is red, stop and report. For a red Compatibility run, suggest `/triage-compat`. - A hassfest **warning** about `pyhive-integration` differing from core hive is expected (see `CLAUDE.md`). Only errors count. - `script/test` and `script/lint --check` must pass locally. - - Check `git log ..origin/master --oneline`. If there's nothing to release, say so. + - Check `git log ..origin/dev --oneline`. If there's nothing to release, say so. -4. **Bump the manifest.** Change only the `version` value in `manifest.json`. Don't touch `requirements`; that's `/bump-pyhive`. The change must reach `master` before tagging: +4. **Bump the manifest.** Change only the `version` value in `manifest.json`. Don't touch `requirements`; that's `/bump-pyhive`. The change must reach `dev` before tagging: - If the user asks, make a branch `release/`, commit it, and open a PR. - Otherwise hand the change over for them to commit. - - Wait until it's merged, then check with `git fetch && git show origin/master:custom_components/hive/manifest.json | jq -r '.version, .requirements[]'`. + - Wait until it's merged, then check with `git fetch && git show origin/dev:custom_components/hive/manifest.json | jq -r '.version, .requirements[]'`. 5. **Publish** (only after the user confirms the tag): ```bash - gh release create --target master --generate-notes --prerelease # beta - gh release create --target master --generate-notes --latest # stable + gh release create --target dev --generate-notes --prerelease # beta + gh release create --target dev --generate-notes --latest # stable ``` For a beta, add the `pyhive-integration` version to the notes, and say whether it's ahead of core's. diff --git a/.claude/skills/repo-health/SKILL.md b/.claude/skills/repo-health/SKILL.md index c303011..93adc32 100644 --- a/.claude/skills/repo-health/SKILL.md +++ b/.claude/skills/repo-health/SKILL.md @@ -17,20 +17,20 @@ gh pr list -R $R --state open --json number,title,author,labels,statusCheckRollu gh issue list -R $R --label no-issue-activity gh pr list -R $R --label no-pr-activity gh release list -R $R -L 5 -git fetch -q origin && git log $(gh release list -R $R -L1 --exclude-pre-releases --json tagName -q '.[0].tagName')..origin/master --oneline -gh api repos/$R/branches/master/protection 2>&1 | jq '{checks: .required_status_checks.contexts, code_owners: .required_pull_request_reviews.require_code_owner_reviews}' +git fetch -q origin && git log $(gh release list -R $R -L1 --exclude-pre-releases --json tagName -q '.[0].tagName')..origin/dev --oneline +gh api repos/$R/branches/dev/protection 2>&1 | jq '{checks: .required_status_checks.contexts, code_owners: .required_pull_request_reviews.require_code_owner_reviews}' gh secret list -R $R # expect BOT_TOKEN ``` (The protection and secrets calls need admin access. If they fail, say so rather than guessing.) Compare what you find with MAINTAINING.md: -- **Workflows:** all active, with no `disabled_inactivity`. The latest CI run on master and the latest Compatibility run should both be green. The last Compatibility run should be under ~26 hours old. +- **Workflows:** all active, with no `disabled_inactivity`. The latest CI run on dev and the latest Compatibility run should both be green. The last Compatibility run should be under ~26 hours old. - **Bot PRs:** Dependabot and pyhive bump PRs with no checks at all mean `BOT_TOKEN` is missing (for pyhive ones). PRs failing checks need attention. Anything older than about 2 weeks is going stale. -- **Unreleased commits on master:** suggest a release if there are user-facing changes. +- **Unreleased commits on dev:** suggest a release if there are user-facing changes. - **Branch protection:** the required checks should be `HACS validation`, `Hassfest`, `Lint` and `Tests`, with code owner review on. - **Secrets:** `BOT_TOKEN` should be present. - **Hassfest:** a warning that `pyhive-integration` differs from core hive is expected (see `CLAUDE.md`), so don't report it as a problem. -- **pyhive-integration:** compare the manifest pin with core hive's pin and with the newest version on PyPI, pre-releases included. A newer pyhive beta than the pin is a candidate for the next component beta (`/bump-pyhive`, then `/release`). A pre-release pin on `master` blocks stable releases until it's moved to a stable version. +- **pyhive-integration:** compare the manifest pin with core hive's pin and with the newest version on PyPI, pre-releases included. A newer pyhive beta than the pin is a candidate for the next component beta (`/bump-pyhive`, then `/release`). A pre-release pin on `dev` blocks stable releases until it's moved to a stable version. - **Latest beta release:** the tag should match the `version` in its manifest (`git show :custom_components/hive/manifest.json | jq -r .version`). - **Pinned HA:** compare the HA version in the `requirements_test.txt` comment with the latest stable on PyPI (`curl -fsS https://pypi.org/pypi/homeassistant/json | jq -r .info.version`). A gap of more than one minor release means the Dependabot PR is stuck. diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7b022a9..2665da1 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,5 +1,5 @@ # Code owners are requested for review automatically on every PR. -# With "Require review from Code Owners" on master, their approval is needed to merge. +# With "Require review from Code Owners" on dev, their approval is needed to merge. # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners * @KJonline diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45d3efe..046168c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,5 @@ -# Checks every PR and push to master. Make the jobs below required checks on master. +# Checks every PR and push to dev, the main branch. Make the jobs below required +# checks on dev. # # This workflow deliberately has no schedule: GitHub auto-disables scheduled # workflows after 60 days without repo activity, which also stops their @@ -8,7 +9,7 @@ name: CI on: pull_request: push: - branches: [master] + branches: [dev] workflow_dispatch: permissions: @@ -43,7 +44,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: astral-sh/setup-uv@v10.2.0 + - uses: astral-sh/setup-uv@v10.3.3 - name: Ruff version from requirements_test.txt id: ruff run: echo "spec=$(grep '^ruff==' requirements_test.txt)" >> "$GITHUB_OUTPUT" @@ -55,7 +56,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: astral-sh/setup-uv@v10.2.0 + - uses: astral-sh/setup-uv@v10.3.3 with: python-version: "3.14" activate-environment: true diff --git a/.github/workflows/compat.yml b/.github/workflows/compat.yml index 2377650..a0c05ea 100644 --- a/.github/workflows/compat.yml +++ b/.github/workflows/compat.yml @@ -38,7 +38,7 @@ jobs: channel: [stable, beta] steps: - uses: actions/checkout@v7 - - uses: astral-sh/setup-uv@v10.2.0 + - uses: astral-sh/setup-uv@v10.3.3 with: python-version: "3.14" activate-environment: true @@ -61,7 +61,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: astral-sh/setup-uv@v10.2.0 + - uses: astral-sh/setup-uv@v10.3.3 with: python-version: "3.14" activate-environment: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 289616e..380aa28 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: astral-sh/setup-uv@v10.2.0 + - uses: astral-sh/setup-uv@v10.3.3 - env: TAG: ${{ github.event.release.tag_name }} PRERELEASE: ${{ github.event.release.prerelease }} diff --git a/CLAUDE.md b/CLAUDE.md index 195765e..1d08f6f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -54,6 +54,8 @@ silence it. ## Working here +- `dev` is the main and default branch. PRs target `dev`, and betas and stable + releases are tagged from it (`--target dev`). `master` is no longer used. - `script/setup`, `script/test`, `script/lint` (`--check` in CI). `.venv` must be Python 3.14 (`script/setup --recreate`). - Tests mock `apyhiveapi`. When the library changes, also exercise the real code: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a8bd5e9..01bd191 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -60,7 +60,8 @@ Add or update a test with every behaviour change. ## Pull requests -- Branch from `master` and open the PR against `master`. +- Branch from `dev` and open the PR against `dev`, the main branch. Betas and stable + releases are both cut from `dev`. - CI must pass: HACS validation, hassfest, lint and tests. - @KJonline is asked to review automatically. - Don't bump `version` in `manifest.json` unless the PR is meant to be released diff --git a/MAINTAINING.md b/MAINTAINING.md index ad16d25..497b63c 100644 --- a/MAINTAINING.md +++ b/MAINTAINING.md @@ -21,7 +21,7 @@ The full version is in [CLAUDE.md](CLAUDE.md). Everything below follows from the | When | Workflow | What it does | If it fails | |---|---|---|---| -| Every PR and every push to `master` | `ci.yml` | HACS validation, hassfest (through `.github/scripts/hassfest.py`, see [Hassfest and the pyhive pin](#hassfest-and-the-pyhive-pin)), lint and tests. A push to master also re-enables scheduled workflows that GitHub turned off. | Fix it in the PR before merging | +| Every PR and every push to `dev` | `ci.yml` | HACS validation, hassfest (through `.github/scripts/hassfest.py`, see [Hassfest and the pyhive pin](#hassfest-and-the-pyhive-pin)), lint and tests. A push to dev also re-enables scheduled workflows that GitHub turned off. | Fix it in the PR before merging | | Daily, 04:17 UTC | `compat.yml` | Tests against the newest HA stable and beta, plus an import check against HA `dev` | [Compatibility is red](#compatibility-is-red) | | Daily, 05:29 UTC | `stale.yml` | Labels issues and PRs inactive for 60 days, then closes issues after 30 more days and PRs after 14 | Add the `pinned` label to keep something open | | Monday, 06:23 UTC | `pyhive_bump.yml` | Opens a PR if a newer `pyhive-integration` is on PyPI | [Dependency PRs](#dependency-prs) | @@ -47,19 +47,19 @@ who opt in. Stable releases go to everyone. | .venv/bin/python -c 'import sys; from packaging.version import Version; print(max(sys.stdin.read().split(), key=Version))' ``` - - **Stable:** the pin must be a stable version. If `master` pins a pyhive beta, wait + - **Stable:** the pin must be a stable version. If `dev` pins a pyhive beta, wait for a stable pyhive, or move the pin back to the latest stable first. -2. Open a PR that sets `version` in `custom_components/hive/manifest.json`. Merge it +2. Open a PR against `dev` that sets `version` in `custom_components/hive/manifest.json`. Merge it once CI passes. -3. Check that the last Compatibility run on `master` passed, so you aren't shipping +3. Check that the last Compatibility run passed (it runs on `dev`), so you aren't shipping something current HA versions break. 4. Publish the release from the same version: ```bash # beta: HACS offers it only to users who opt into betas - gh release create 2026.10.0b1 --target master --prerelease --generate-notes + gh release create 2026.10.0b1 --target dev --prerelease --generate-notes # stable - gh release create 2026.10.0 --target master --latest --generate-notes + gh release create 2026.10.0 --target dev --latest --generate-notes ``` For a beta, mention the `pyhive-integration` version in the release notes. @@ -151,7 +151,8 @@ users on older HA versions. ## Repo settings (one-time; check they're still on) -- **Branch protection on `master`:** +- **Branch protection on `dev`** (the default branch, which all PRs and releases + go through): - Require the checks *HACS validation*, *Hassfest*, *Lint* and *Tests*. - Turn on *Require review from Code Owners*. - **Secret `BOT_TOKEN`:** a fine-grained PAT with Contents and Pull requests write @@ -161,7 +162,7 @@ users on older HA versions. It triggers a bump PR as soon as Pyhive releases. - **Scheduled workflows enabled:** - Check with `gh workflow list --all`. - - CI switches them back on after the next push to master, but if the repo goes + - CI switches them back on after the next push to dev, but if the repo goes quiet for 60 days they stop again. ## Known issues in the code diff --git a/README.md b/README.md index c8891ba..59e3eb0 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ python script/gen_translations.py # regenerate translations/en.json after edi | Workflow | When | What | | --- | --- | --- | -| `ci.yml` | PRs and pushes to master | HACS validation, hassfest, ruff, tests | +| `ci.yml` | PRs and pushes to dev | HACS validation, hassfest, ruff, tests | | `compat.yml` | Nightly | Tests against the latest HA stable and beta, import check against HA dev | | `release.yml` | Release published | Checks the tag matches `manifest.json`, attaches `hive.zip` | | `pyhive_bump.yml` | Weekly, manual, or dispatched from Pyhive | Opens a PR bumping `pyhive-integration` | diff --git a/custom_components/hive/__init__.py b/custom_components/hive/__init__.py index 5c2527a..533f507 100755 --- a/custom_components/hive/__init__.py +++ b/custom_components/hive/__init__.py @@ -9,22 +9,49 @@ from aiohttp.web_exceptions import HTTPException from apyhiveapi import Auth, Hive -from apyhiveapi.helper.hive_exceptions import HiveReauthRequired +from apyhiveapi.helper.hive_exceptions import ( + HiveConnectionError, + HiveReauthRequired, + HiveUnknownConfiguration, +) from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_SCAN_INTERVAL from homeassistant.core import HomeAssistant from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady -from homeassistant.helpers import aiohttp_client, device_registry as dr +from homeassistant.helpers import ( + aiohttp_client, + config_validation as cv, + device_registry as dr, +) from homeassistant.helpers.dispatcher import async_dispatcher_send +from homeassistant.helpers.typing import ConfigType from .const import DOMAIN, PLATFORM_LOOKUP, PLATFORMS from .entity import HiveEntity +try: + # Home Assistant 2026.11 moved the boost_* entity services out of the + # climate / water_heater platforms (which this component re-exports) into + # hive/services.py, registered from core's async_setup. This component + # replaces the hive domain, so core's async_setup never runs: call it here. + from homeassistant.components.hive.services import async_setup_services +except ImportError: # Home Assistant < 2026.11: the platforms register them. + async_setup_services = None + _LOGGER = logging.getLogger(__name__) type HiveConfigEntry = ConfigEntry[Hive] +CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN) + + +async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: + """Set up the Hive integration.""" + if async_setup_services is not None: + async_setup_services(hass) + return True + async def async_setup_entry(hass: HomeAssistant, entry: HiveConfigEntry) -> bool: """Set up Hive from a config entry.""" @@ -43,7 +70,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: HiveConfigEntry) -> bool except HTTPException as error: _LOGGER.error("Could not connect to the internet: %s", error) raise ConfigEntryNotReady from error - except HiveReauthRequired as err: + except HiveConnectionError as error: + _LOGGER.error("Could not fetch devices from Hive: %s", error) + raise ConfigEntryNotReady from error + except (HiveReauthRequired, HiveUnknownConfiguration) as err: raise ConfigEntryAuthFailed from err device_registry = dr.async_get(hass) @@ -89,13 +119,13 @@ async def async_remove_config_entry_device( return True -def refresh_system[_HiveEntityT: HiveEntity, **_P]( - func: Callable[Concatenate[_HiveEntityT, _P], Awaitable[Any]], -) -> Callable[Concatenate[_HiveEntityT, _P], Coroutine[Any, Any, None]]: +def refresh_system[HiveEntityT: HiveEntity, **P]( + func: Callable[Concatenate[HiveEntityT, P], Awaitable[Any]], +) -> Callable[Concatenate[HiveEntityT, P], Coroutine[Any, Any, None]]: """Force update all entities after state change.""" @wraps(func) - async def wrapper(self: _HiveEntityT, *args: _P.args, **kwargs: _P.kwargs) -> None: + async def wrapper(self: HiveEntityT, *args: P.args, **kwargs: P.kwargs) -> None: await func(self, *args, **kwargs) async_dispatcher_send(self.hass, DOMAIN) diff --git a/custom_components/hive/binary_sensor.py b/custom_components/hive/binary_sensor.py index 6fddc41..c89aecb 100755 --- a/custom_components/hive/binary_sensor.py +++ b/custom_components/hive/binary_sensor.py @@ -1 +1 @@ -from homeassistant.components.hive.binary_sensor import * \ No newline at end of file +from homeassistant.components.hive.binary_sensor import * diff --git a/custom_components/hive/climate.py b/custom_components/hive/climate.py index 5db4b4b..5d07024 100755 --- a/custom_components/hive/climate.py +++ b/custom_components/hive/climate.py @@ -1 +1 @@ -from homeassistant.components.hive.climate import * \ No newline at end of file +from homeassistant.components.hive.climate import * diff --git a/custom_components/hive/config_flow.py b/custom_components/hive/config_flow.py index 26174c2..2922fa2 100755 --- a/custom_components/hive/config_flow.py +++ b/custom_components/hive/config_flow.py @@ -4,6 +4,7 @@ from collections.abc import Mapping import copy +import logging from typing import Any from apyhiveapi import Auth @@ -23,7 +24,6 @@ ) from homeassistant.const import CONF_PASSWORD, CONF_SCAN_INTERVAL, CONF_USERNAME from homeassistant.core import callback -import logging from . import HiveConfigEntry from .const import ( @@ -52,7 +52,10 @@ def _walk(node: Any) -> Any: result: dict[str, Any] = {} for key, value in node.items(): key_lower = key.lower() - if any(part in key_lower for part in ("password", "token", "secret", "code", "session")): + if any( + part in key_lower + for part in ("password", "token", "secret", "code", "session") + ): result[key] = _mask(value) else: result[key] = _walk(value) @@ -128,7 +131,11 @@ async def async_step_user( auth_result = self.tokens.get("AuthenticationResult", {}) new_device = auth_result.get("NewDeviceMetadata") or {} access_token = auth_result.get("AccessToken") - if new_device.get("DeviceGroupKey") and new_device.get("DeviceKey") and access_token: + if ( + new_device.get("DeviceGroupKey") + and new_device.get("DeviceKey") + and access_token + ): # If Hive returned fresh device metadata directly from login, register it now # so fallback device auth works when refresh tokens expire. self.hive_auth.access_token = access_token @@ -136,10 +143,16 @@ async def async_step_user( self.hive_auth.device_key = new_device["DeviceKey"] try: await self.hive_auth.device_registration(self.device_name) - self.data["device_data"] = await self.hive_auth.get_device_data() - _LOGGER.debug("Stored Hive device_data from login NewDeviceMetadata.") + self.data[ + "device_data" + ] = await self.hive_auth.get_device_data() + _LOGGER.debug( + "Stored Hive device_data from login NewDeviceMetadata." + ) except HiveApiError: - _LOGGER.warning("Hive device registration failed after login; continuing without device_data.") + _LOGGER.warning( + "Hive device registration failed after login; continuing without device_data." + ) try: return await self.async_setup_hive_entry() diff --git a/custom_components/hive/const.py b/custom_components/hive/const.py index 0caf965..99df0f5 100755 --- a/custom_components/hive/const.py +++ b/custom_components/hive/const.py @@ -1,4 +1,5 @@ """Constants for Hive.""" + from homeassistant.const import Platform ATTR_MODE = "mode" diff --git a/custom_components/hive/manifest.json b/custom_components/hive/manifest.json index ac3c013..dd2d9b6 100755 --- a/custom_components/hive/manifest.json +++ b/custom_components/hive/manifest.json @@ -11,6 +11,6 @@ "iot_class": "cloud_polling", "issue_tracker": "https://github.com/Pyhass/Hive-Custom-Component/issues", "loggers": ["apyhiveapi"], - "requirements": ["pyhive-integration==1.0.10"], - "version": "2026.10.1b2" + "requirements": ["pyhive-integration==2.0.0b5"], + "version": "2026.11.0b1" } diff --git a/custom_components/hive/sensor.py b/custom_components/hive/sensor.py index 0c3030c..378b98a 100755 --- a/custom_components/hive/sensor.py +++ b/custom_components/hive/sensor.py @@ -5,6 +5,8 @@ from datetime import timedelta from typing import Any +from apyhiveapi import Hive + from homeassistant.components.sensor import ( SensorDeviceClass, SensorEntity, @@ -23,13 +25,11 @@ from . import HiveConfigEntry from .entity import HiveEntity -from apyhiveapi import Hive PARALLEL_UPDATES = 0 SCAN_INTERVAL = timedelta(seconds=15) - @dataclass(frozen=True) class HiveSensorEntityDescription(SensorEntityDescription): """Describes Hive sensor entity.""" diff --git a/custom_components/hive/translations/en.json b/custom_components/hive/translations/en.json index 4ff73ae..90c237a 100755 --- a/custom_components/hive/translations/en.json +++ b/custom_components/hive/translations/en.json @@ -1,62 +1,124 @@ { "config": { - "abort": { - "already_configured": "Account is already configured", - "reauth_successful": "Re-authentication was successful", - "unknown_entry": "Unable to find existing entry." + "step": { + "user": { + "title": "Hive login", + "description": "Enter your Hive login information.", + "data": { + "username": "Username", + "password": "Password", + "disable_2fa_debug": "Disable 2FA (debug)", + "scan_interval": "Scan interval (seconds)" + } }, - "error": { - "invalid_code": "Failed to sign into Hive. Your two-factor authentication code was incorrect.", - "invalid_password": "Failed to sign into Hive. Incorrect password please try again.", - "invalid_username": "Failed to sign into Hive. Your email address is not recognised.", - "twofa_bypassed_debug": "2FA step was intentionally bypassed for debug. Check Home Assistant logs for Hive auth responses.", - "no_internet_available": "An internet connection is required to connect to Hive.", - "unknown": "Unexpected error" + "2fa": { + "title": "Hive two-factor authentication", + "description": "Enter your Hive authentication code.\n\nPlease enter code 0000 to request another code.", + "data": { + "2fa": "Two-factor code" + } }, - "step": { - "2fa": { - "data": { - "2fa": "Two-factor code" - }, - "description": "Enter your Hive authentication code. \n \n Please enter code 0000 to request another code.", - "title": "Hive Two-factor Authentication." - }, - "configuration": { - "data": { - "device_name": "Device Name" - }, - "description": "Enter your Hive configuration ", - "title": "Hive Configuration." - }, - "reauth": { - "data": { - "password": "Password", - "username": "Username" - }, - "description": "Re-enter your Hive login information.", - "title": "Hive Login" - }, - "user": { - "data": { - "password": "Password", - "disable_2fa_debug": "Disable 2FA (debug)", - "scan_interval": "Scan Interval (seconds)", - "username": "Username" - }, - "description": "Enter your Hive login information.", - "title": "Hive Login" - } + "configuration": { + "title": "Hive configuration", + "description": "Enter your Hive configuration.", + "data": { + "device_name": "Device name" + } + }, + "reauth": { + "title": "Hive login", + "description": "Re-enter your Hive login information.", + "data": { + "username": "Username", + "password": "Password" + } } + }, + "error": { + "invalid_username": "Failed to sign in to Hive. Your email address is not recognized.", + "invalid_password": "Failed to sign in to Hive. Incorrect password, please try again.", + "invalid_code": "Failed to sign in to Hive. Your two-factor authentication code was incorrect.", + "twofa_bypassed_debug": "2FA step was intentionally bypassed for debug. Check Home Assistant logs for Hive auth responses.", + "no_internet_available": "An Internet connection is required to connect to Hive.", + "unknown": "Unexpected error" + }, + "abort": { + "already_configured": "Account is already configured", + "unknown_entry": "Unable to find existing entry.", + "reauth_successful": "Re-authentication was successful" + } }, "options": { - "step": { - "user": { - "data": { - "scan_interval": "Scan Interval (seconds)" - }, - "description": "Update the scan interval to poll for data more often.", - "title": "Options for Hive" - } + "step": { + "user": { + "title": "Options for Hive", + "description": "Update the scan interval to poll for data more often.", + "data": { + "scan_interval": "Scan interval (seconds)" + } + } + } + }, + "services": { + "boost_heating_on": { + "name": "Boost heating on", + "description": "Sets the boost mode ON, defining the period of time and the desired target temperature for the boost.", + "fields": { + "time_period": { + "name": "Time period", + "description": "The time period for the boost." + }, + "temperature": { + "name": "Temperature", + "description": "The target temperature for the boost period." + } + } + }, + "boost_heating_off": { + "name": "Boost heating off", + "description": "Sets the boost mode OFF.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "The entity ID to turn boost off." + } + } + }, + "boost_hot_water": { + "name": "Boost hotwater", + "description": "Sets the boost mode ON or OFF, defining the period of time for the boost.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "The entity ID to boost." + }, + "time_period": { + "name": "Time period", + "description": "The time period for the boost." + }, + "on_off": { + "name": "Mode", + "description": "Set the boost function on or off." + } + } + } + }, + "entity": { + "sensor": { + "heating": { + "state": { + "manual": "Manual", + "off": "Off", + "schedule": "Schedule" + } + }, + "hot_water": { + "state": { + "on": "On", + "off": "Off", + "schedule": "Schedule" + } } + } } } diff --git a/requirements_test.txt b/requirements_test.txt index c7b64a2..c0136b7 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -2,4 +2,4 @@ # Bumped by Dependabot; the nightly compat workflow also tests the latest stable and beta. ruff==0.17.3 -pytest-homeassistant-custom-component==0.13.370 +pytest-homeassistant-custom-component==0.13.375