Skip to content

fix: add translations for the eight new MOD sensors #201

fix: add translations for the eight new MOD sensors

fix: add translations for the eight new MOD sensors #201

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
# Lets the suite be run by hand against any branch — used to confirm a test
# actually fails when the defect it targets is reintroduced.
workflow_dispatch:
jobs:
# Fast suite: pure protocol logic, no Home Assistant. Runs in well under a second,
# which is what makes it usable on every register-map change.
unit:
name: Unit tests (no HA)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: pip install pytest pymodbus pyserial
- name: Run tests
run: pytest tests/ -v
# Home Assistant suite: config flow, setup/unload, entity creation, diagnostics.
#
# Linux only. Home Assistant pins lru-dict==1.3.0, which has no CPython 3.13 Windows
# wheel and needs a C compiler — so this cannot run on a Windows dev machine, and CI
# is the only place these tests execute.
#
# pytest-homeassistant-custom-component is pinned deliberately: each release targets
# one specific HA version, so leaving it floating means an upstream HA release can
# break this job without any change here. Bump it on purpose.
homeassistant:
name: Home Assistant integration tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
# pymodbus and pyserial are the integration's own manifest.json requirements.
# Home Assistant installs those itself at runtime, but the test harness does not —
# so without them config_flow.py fails at `import serial` and every test dies with
# a bare "Import error" from HA's platform loader.
- name: Install Home Assistant test harness
run: pip install pytest-homeassistant-custom-component==0.13.316 pymodbus pyserial
- name: Run tests
run: pytest tests_ha/ -v