Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
f4457a9
E2E fallback coverage + FE timeline refresh (#2)
Muriel2Horak Jan 13, 2026
eeed934
docs: sync user documentation with current config (#3)
Muriel2Horak Jan 13, 2026
d385bde
Fix dashboard auth and module path (#4)
Muriel2Horak Jan 13, 2026
a9f2215
Update checks and battery efficiency coverage
Muriel2Horak Jan 14, 2026
bc9e46a
Fix dashboard E2E stability + coordinator init coverage (#5)
Muriel2Horak Jan 15, 2026
a25c008
Bump manifest version to 2.1.1
Muriel2Horak Jan 15, 2026
aab299c
Bump manifest version to 2.1.3 (#6)
Muriel2Horak Jan 15, 2026
4249a1e
Fix dashboard init, tiles, and HA watcher updates
Muriel2Horak Jan 15, 2026
d460b9a
Bump dashboard CSS cache buster
Muriel2Horak Jan 15, 2026
6b3a6b1
Fix pricing tab stats refresh and efficiency handling
Muriel2Horak Jan 15, 2026
98ce8cb
Ensure pricing stats render on first load
Muriel2Horak Jan 15, 2026
9015211
Bootstrap pricing stats on load
Muriel2Horak Jan 15, 2026
b0f0ebc
Bootstrap battery efficiency stats after analytics load
Muriel2Horak Jan 15, 2026
70ba146
Fix battery efficiency sensor resolution
Muriel2Horak Jan 15, 2026
0af7d56
Fix battery efficiency monthly history calc
Muriel2Horak Jan 15, 2026
ac9791a
Fallback battery efficiency to recorder statistics
Muriel2Horak Jan 15, 2026
427b686
Fix efficiency stats fallback to use state values
Muriel2Horak Jan 15, 2026
6f64aed
Use statistics sums for monthly charge/discharge
Muriel2Horak Jan 15, 2026
fd3d193
Choose plausible efficiency metrics from history
Muriel2Horak Jan 15, 2026
e5d5ad7
Use last statistics sum for monthly totals
Muriel2Horak Jan 15, 2026
53bd488
Prefer history bounds for monthly efficiency
Muriel2Horak Jan 15, 2026
25d8ae8
Guard against implausible battery efficiency
Muriel2Horak Jan 15, 2026
21faf82
Backfill battery health from statistics
Muriel2Horak Jan 15, 2026
b9b308d
Use p80 of last 20 battery health samples
Muriel2Horak Jan 15, 2026
78bc7ad
Add battery health detail stats and popup
Muriel2Horak Jan 15, 2026
27ad3b4
Refine battery health tile and detail view
Muriel2Horak Jan 15, 2026
ac716ad
Simplify battery health tile and drop today plan tile
Muriel2Horak Jan 15, 2026
7161240
Remove battery efficiency fallback
Muriel2Horak Jan 15, 2026
ee15309
Refresh battery efficiency on sensor changes
Muriel2Horak Jan 15, 2026
583e500
Fix planner badge fetch and update
Muriel2Horak Jan 15, 2026
00279d4
Tighten battery health tile layout
Muriel2Horak Jan 15, 2026
68b8671
Allow efficiency tile to render from last-month attrs
Muriel2Horak Jan 15, 2026
2100438
Limit flip animation to opt-in elements
Muriel2Horak Jan 15, 2026
66d2ef4
Prevent battery health tile text overflow
Muriel2Horak Jan 15, 2026
ea1de20
Refine card styling and flip animation visuals
Muriel2Horak Jan 15, 2026
b0101c3
Preserve last month efficiency when history is missing
Muriel2Horak Jan 15, 2026
d642539
Persist monthly efficiency snapshot during updates
Muriel2Horak Jan 15, 2026
8a84296
Use month-end totals for efficiency inputs
Muriel2Horak Jan 15, 2026
0c1255b
Relax battery efficiency plausibility range
Muriel2Horak Jan 15, 2026
b98b546
Simplify battery efficiency month-end history lookup
Muriel2Horak Jan 15, 2026
84ec59b
Compute battery efficiency from monthly statistics
Muriel2Horak Jan 15, 2026
c664fc6
Simplify battery efficiency to charge/discharge ratio
Muriel2Horak Jan 15, 2026
5137600
Normalize Mode 0-3 labels in dashboard UI
Muriel2Horak Jan 15, 2026
644380c
Make recommended mode plan-only
Muriel2Horak Jan 15, 2026
cec108d
Fix efficiency history and recommended mode update
Muriel2Horak Jan 16, 2026
89a4666
Silence frontend eslint warnings
Muriel2Horak Jan 16, 2026
f3c0b3e
Fix Sonar code smells in planner and payload parsing
Muriel2Horak Jan 16, 2026
759d723
Fix pricing loading overlay and CHMU badge
Muriel2Horak Jan 16, 2026
efdc3b3
Address PR review nits
Muriel2Horak Jan 16, 2026
e0a9e8d
Merge pull request #7 from Muriel2Horak/fe-refactor
Muriel2Horak Jan 16, 2026
73e67c5
Update changelog for 2.1.4
Muriel2Horak Jan 16, 2026
4fa9938
Use final 15-min price for planner
Muriel2Horak Jan 16, 2026
901136f
Guard price sensor lookup without hass.data
Muriel2Horak Jan 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: "2"
exclude_patterns:
- "custom_components/oig_cloud/www/**"
- "custom_components/oig_cloud/lib/**"
- "custom_components/oig_cloud/oig_cloud_battery_forecast.py"
4 changes: 4 additions & 0 deletions .codefactor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
exclude_patterns:
- "custom_components/oig_cloud/www/**"
- "custom_components/oig_cloud/lib/**"
- "custom_components/oig_cloud/oig_cloud_battery_forecast.py"
8 changes: 8 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[run]
source = custom_components/oig_cloud
relative_files = True

[report]
skip_covered = True
show_missing = False

21 changes: 21 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"env": {
"browser": true,
"es2021": true
},
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "script"
},
"rules": {
"eqeqeq": "off",
"max-depth": "off",
"max-lines-per-function": "off",
"max-params": "off",
"no-alert": "off",
"no-undef": "off",
"no-unused-vars": "off",
"no-var": "off",
"prefer-const": "off"
}
}
23 changes: 23 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[flake8]
max-line-length = 88
max-complexity = 100
extend-ignore = E203,E501
exclude =
.git,
__pycache__,
.venv,
venv,
.mypy_cache,
.pytest_cache,
.ruff_cache,
.dev_docs,
.ha-env,
.ha-env-313,
.ha-env-*,
.pyenv,
local_dev,
node_modules,
tests,
htmlcov,
build,
dist
2 changes: 0 additions & 2 deletions .github/copilot-instructions.md

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/hacs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:
schedule:
- cron: "0 0 * * *"

permissions:
contents: read

jobs:
hacs:
name: HACS Action
runs-on: "ubuntu-latest"
steps:
- name: HACS Action
uses: "hacs/action@main"
uses: "hacs/action@6f81caf1dd4cc0f615444dba4d4a3ceaa22db99c"
with:
category: "integration"
5 changes: 4 additions & 1 deletion .github/workflows/hassfest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ on:
schedule:
- cron: '0 0 * * *'

permissions:
contents: read

jobs:
validate:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "home-assistant/actions/hassfest@master"
- uses: "home-assistant/actions/hassfest@87c064c607f3c5cc673a24258d0c98d23033bfc3"
46 changes: 46 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Quality Checks

on:
push:
branches:
- main
- temp-into-main
pull_request:

jobs:
python-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt

- name: Run flake8
run: |
python -m flake8

frontend-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"

- name: Install frontend dependencies
run: npm ci

- name: Run frontend lint
run: npm test
63 changes: 54 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
required: true
default: 'false'

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -19,6 +22,16 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Validate version input
id: validate_version
run: |
VERSION="${{ github.event.inputs.version }}"
if [ "$VERSION" != "dev" ] && ! [[ "$VERSION" =~ ^[0-9]+(\.[0-9]+)*(-[0-9A-Za-z.-]+)?$ ]]; then
echo "Invalid version: $VERSION"
exit 1
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

- name: Set up Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -27,8 +40,9 @@ jobs:
- name: Replace version and service in release_const.py
working-directory: ./custom_components/oig_cloud
run: |
echo 'COMPONENT_VERSION = "${{ github.event.inputs.version }}"' > release_const.py
if [ "${{ github.event.inputs.version }}" == "dev" ]; then
VERSION="${{ steps.validate_version.outputs.version }}"
echo "COMPONENT_VERSION = \"$VERSION\"" > release_const.py
if [ "$VERSION" == "dev" ]; then
echo 'SERVICE_NAME = "oig_cloud_dev"' >> release_const.py
else
echo 'SERVICE_NAME = "oig_cloud"' >> release_const.py
Expand All @@ -37,10 +51,11 @@ jobs:
- name: Update version property in manifest.json
working-directory: ./custom_components/oig_cloud
run: |
if [ "${{ github.event.inputs.version }}" == "dev" ]; then
VERSION="${{ steps.validate_version.outputs.version }}"
if [ "$VERSION" == "dev" ]; then
jq --arg version '0.0.0' '.version = $version' manifest.json > manifest.tmp && mv manifest.tmp manifest.json
else
jq --arg version ${{ github.event.inputs.version }} '.version = $version' manifest.json > manifest.tmp && mv manifest.tmp manifest.json
jq --arg version "$VERSION" '.version = $version' manifest.json > manifest.tmp && mv manifest.tmp manifest.json
fi


Expand All @@ -50,7 +65,7 @@ jobs:
git config --global user.name "Pavel Simsa"
git config --global user.email "pavel@simsa.cz"
git add release_const.py manifest.json
git commit -m "Setting release variables to ${{ github.event.inputs.version }}"
git commit -m "Setting release variables to ${{ steps.validate_version.outputs.version }}"

- name: Push changes
working-directory: ./custom_components/oig_cloud
Expand All @@ -62,16 +77,46 @@ jobs:
if: ${{ github.event.inputs.create-tag == 'true' }}
working-directory: ./custom_components/oig_cloud
run: |
git tag -a v${{ github.event.inputs.version }} -m "Version ${{ github.event.inputs.version }}"
git tag -a v${{ steps.validate_version.outputs.version }} -m "Version ${{ steps.validate_version.outputs.version }}"
git push --tags

- name: Extract release notes from CHANGELOG.md
id: changelog
if: ${{ github.event.inputs.create-tag == 'true' }}
run: |
VERSION="${{ steps.validate_version.outputs.version }}"
if [ ! -f CHANGELOG.md ]; then
{
echo "notes<<EOF"
echo "Release ${VERSION}"
echo "EOF"
} >> "$GITHUB_OUTPUT"
exit 0
fi

NOTES="$(awk -v ver="$VERSION" '
$0 ~ "^## \\[" ver "\\]" { in_section=1 }
in_section && $0 ~ "^## \\[" && $0 !~ "^## \\[" ver "\\]" { exit }
in_section { print }
' CHANGELOG.md)"

if [ -z "$NOTES" ]; then
NOTES="Release ${VERSION}"
fi

{
echo "notes<<EOF"
echo "$NOTES"
echo "EOF"
} >> "$GITHUB_OUTPUT"

- name: Create draft release
uses: actions/create-release@v1
if: ${{ github.event.inputs.create-tag == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.event.inputs.version }}
release_name: Release ${{ github.event.inputs.version }}
tag_name: v${{ steps.validate_version.outputs.version }}
release_name: Release ${{ steps.validate_version.outputs.version }}
body: ${{ steps.changelog.outputs.notes }}
draft: true

65 changes: 37 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,49 @@ on:
pull_request:
branches:
- main
- temp
push:
branches:
- main
- temp

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt || true

- name: Set PYTHONPATH
run: echo "PYTHONPATH=$(pwd)" >> $GITHUB_ENV

- name: Run tests
run: |
pytest
- name: Checkout repository
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt

- name: Run tests (with coverage)
env:
PYTHONPATH: ${{ github.workspace }}
run: |
pytest -v --tb=short --cov=custom_components/oig_cloud --cov-report=xml --cov-report=term-missing:skip-covered

- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-xml
path: coverage.xml
Loading