Skip to content

Releases: vale76p/Newlab

v1.3.0

Choose a tag to compare

@vale76p vale76p released this 07 Mar 23:08
  • ConfigEntryAuthFailed / ConfigEntryNotReady — async_setup_entry now raises proper
    HA exceptions instead of return False, enabling automatic credential re-prompt and retry UI.
  • Options flow precedence fix — poll interval is now read from entry.options before
    entry.data, so a configured override is preserved after integration reload.
  • Integration tests — 6 async tests with pytest-homeassistant-custom-component covering
    setup, auth failure, connection failure, unload, entity creation, and options reload.
  • HTTP client edge-case tests — 14 new tests covering login failures, HTTP errors, unauthenticated
    calls, and ensure_authenticated; client.py coverage raised to 91%.
  • HTML parser contract tests — 40 tests across 9 fixture files covering strategies A/B/C/D,
    EN/IT i18n, offline detection, parse errors, and all label resolution fallbacks; parsers.py at 100%.
  • mypy gradual type checking — [tool.mypy] section in pyproject.toml; CI blocks on type errors.
  • Extended ruff rules — added C4, PIE, RET, TC rule sets.
  • CI Python matrix — validate.yml now runs on Python 3.11 and 3.12.
  • Coverage gate — CI fails if total coverage drops below 85%.
  • release.yml — automated GitHub Release on v*.*.* tags, with manifest version

v1.2.0 — Code Review & Bug Fixes

Choose a tag to compare

@vale76p vale76p released this 06 Mar 22:58

Fixed

  • NewlabParseError missing from client.py imports — login flow would crash with NameError if the welcome page HTML lacked the CSRF token. Re-added the import from models.
  • Silent error swallowing in set_light() / async_refresh_plant() — restored _LOGGER.warning on non-200 responses and _LOGGER.error on connection exceptions; added _LOGGER.error when called without authentication.
  • Reduced observability in parsers.py — restored per-strategy DEBUG logging, added ERROR log before raising NewlabParseError, and WARNING logs when system-info fields are not found.
  • URL comparison in get_groups() — fixed login-redirect detection to use case-insensitive comparison (HOME_URL.lower()).
  • Import ordering — fixed ruff I001 violations across coordinator, config_flow, and test modules.
  • Quoted type annotation — removed unnecessary string quotes from config_flow.py:async_get_options_flow return type (UP037).

Changed

  • Shared DeviceInfo via coordinator — coordinator.hub_device_info property replaces identical DeviceInfo(…) blocks duplicated in light.py, number.py, sensor.py, and button.py. Entities now delegate to self.coordinator.hub_device_info.
  • Public parser API — renamed _parse_groups → parse_groups and _parse_system_info → parse_system_info in parsers.py; updated api.py facade exports and all internal callers.
  • strings.json in English — HA convention requires strings.json in English; Italian translations remain in translations/it.json.
  • Ruff lint rules expanded — added I (isort), B (bugbear), UP (pyupgrade), SIM (simplify). Suppressed UP017 (datetime.UTC) for Python 3.9 test compatibility.
  • Dead constants removed — CONF_USERNAME, CONF_PASSWORD, DATA_COORDINATOR, DATA_API removed from const.py (unused after Codex refactor).

Added

  • 6 new parser tests — Strategy C (data-group), Strategy D (broad fallback), L4 (td_text), parse-error (pytest.raises), partial system info, empty HTML. Total parsing tests: 12 (was 6).
  • pytest.raises idiom — replaced try/except/raise AssertionError anti-pattern in test_client.py and test_coordinator.py.

Quality

  • Ruff lint: 0 errors (was 9).
  • Test suite: 31 tests, all passing.
  • Coverage: 87% total (was 84%). parsers.py and models.py at 100%.

v1.1.1

Choose a tag to compare

@vale76p vale76p released this 06 Mar 16:17
  • Minor bug fixing.

[v1.0.2a] Fix polling cloud info at load only

Choose a tag to compare

@vale76p vale76p released this 06 Mar 09:11
update parse info detail only once

[v1.0.2] Minor bug fix + brand logo update

Choose a tag to compare

@vale76p vale76p released this 06 Mar 08:23
logo update

[v1.0.1] Minor bug fix

Choose a tag to compare

@vale76p vale76p released this 05 Mar 22:21
hacs

[v1.0.0] - First public release

Choose a tag to compare

@vale76p vale76p released this 05 Mar 15:48
v1.0.0