Skip to content

Commit 5c805f3

Browse files
authored
Merge pull request #154 from mvdwetering/bump_min_ha_version
Bump min HA version to 2025.12.0 and move requirements to pyproject.toml
2 parents 0fbb1ad + 1e277c1 commit 5c805f3

7 files changed

Lines changed: 166 additions & 226 deletions

File tree

.github/workflows/push.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: "ubuntu-latest"
1616
strategy:
1717
matrix:
18-
python-version: ["3.13"]
18+
python-version: ["3.13", "3.14"]
1919
steps:
2020
- uses: "actions/checkout@v4"
2121
- name: Set up Python ${{ matrix.python-version }}
@@ -25,9 +25,7 @@ jobs:
2525
- name: Install dependencies
2626
run: |
2727
python -m pip install --upgrade pip
28-
pip install flake8 pytest
29-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
30-
if [ -f requirements_test.txt ]; then pip install -r requirements_test.txt; fi
28+
pip install -e .[dev]
3129
- name: Test with pytest
3230
run: |
3331
pytest

bump_min_ha_version.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
# bump_min_ha_version.sh
3+
# Usage: ./bump_min_ha_version.sh <ha_version> <pytest_homeassistant_version>
4+
# Example: ./bump_min_ha_version.sh 2025.3.0 0.13.215
5+
6+
7+
set -e
8+
9+
# Determine the directory where the script is located
10+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
11+
12+
if [ $# -ne 2 ]; then
13+
echo "Usage: $0 <ha_version> <pytest_homeassistant_version>"
14+
15+
# Get the previous version from hacs.json
16+
CURRENT_HA_VERSION=$(grep -oP '"homeassistant":\s*"\K[0-9.]+' "$SCRIPT_DIR/hacs.json" | head -n1)
17+
echo "Current minimum Home Assistant version is: $CURRENT_HA_VERSION"
18+
19+
# Get current pytest-homeassistant-custom-component version
20+
CURRENT_PYTEST_HA_VERSION=$(grep -oP 'pytest-homeassistant-custom-component==\K[0-9.]+' "$SCRIPT_DIR/pyproject.toml" | head -n1)
21+
echo "Current pytest-homeassistant-custom-component version is: $CURRENT_PYTEST_HA_VERSION"
22+
exit 1
23+
fi
24+
25+
NEW_VERSION="$1"
26+
PYTEST_HA_VERSION="$2"
27+
28+
# Update homeassistant version in hacs.json
29+
sed -i "s/\"homeassistant\": \"[0-9.]*\"/\"homeassistant\": \"$NEW_VERSION\"/" "$SCRIPT_DIR/hacs.json"
30+
31+
# Update homeassistant-stubs in pyproject.toml
32+
sed -i "s/homeassistant-stubs==[0-9.]*/homeassistant-stubs==$NEW_VERSION/" "$SCRIPT_DIR/pyproject.toml"
33+
34+
# Update pytest-homeassistant-custom-component
35+
sed -i "s/pytest-homeassistant-custom-component==[0-9.]*/pytest-homeassistant-custom-component==$PYTEST_HA_VERSION/" "$SCRIPT_DIR/pyproject.toml"
36+
37+
# Update minimum HA version in README.md
38+
sed -i "s/Minimum required Home Assistant version is: [0-9.]*/Minimum required Home Assistant version is: $NEW_VERSION/" "$SCRIPT_DIR/README.md"
39+
40+
echo "Minimum HA version bumped to $NEW_VERSION in hacs.json, pyproject.toml, and README.md files."
41+
echo "pytest-homeassistant-custom-component updated to $PYTEST_HA_VERSION."

hacs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Philips Hue Play HDMI Sync Box",
3-
"homeassistant": "2025.2.0",
3+
"homeassistant": "2025.12.0",
44
"render_readme": true,
55
"zip_release": true,
66
"filename": "huesyncbox.zip"

0 commit comments

Comments
 (0)