Files
rickandCursor 1c2f8b6c07 Initial commit: Battery Lifetime integration v0.1.0
A Home Assistant custom integration that turns every numeric percent
battery sensor into an actionable predicted-replacement-by datetime,
with auto-detection of replacements, lithium/alkaline chemistry
profiles, a confidence ladder, cold-start backfill from long-term
statistics, and a forward-prediction service. HACS-installable.

Implements the add-battery-lifetime OpenSpec change:
- 56/62 tasks done (10.2-10.7 are manual-validation gates)
- 18 spec requirements across 5 capabilities
- 107 unit tests passing under pytest-homeassistant-custom-component

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-08 18:53:51 +02:00

23 lines
649 B
Python

"""Pytest configuration shared across the Battery Lifetime test suite.
We auto-enable ``pytest_homeassistant_custom_component``'s fixtures (which give
us ``hass``, ``hass_storage``, etc.) for the integration-level tests, and
provide a few helpers used by the pure-logic tests.
"""
from __future__ import annotations
from collections.abc import Generator
import pytest
pytest_plugins = ("pytest_homeassistant_custom_component",)
@pytest.fixture(autouse=True)
def auto_enable_custom_integrations(
enable_custom_integrations: None,
) -> Generator[None, None, None]:
"""Enable HA's custom-integrations loader for every test."""
yield