mirror of
https://github.com/jdejaegh/irm-kmi-ha.git
synced 2025-06-26 19:35:40 +02:00
Compare commits
2 commits
3ef90ba688
...
196d4cc178
Author | SHA1 | Date | |
---|---|---|---|
196d4cc178 | |||
225a853b27 |
8 changed files with 58 additions and 9 deletions
2
.github/workflows/pytest.yml
vendored
2
.github/workflows/pytest.yml
vendored
|
@ -10,7 +10,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.12"]
|
||||
python-version: ["3.13"]
|
||||
|
||||
steps:
|
||||
- uses: MathRobin/timezone-action@v1.1
|
||||
|
|
27
.github/workflows/release.yml
vendored
Normal file
27
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
name: Create release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*.*.*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
uses: ./.github/workflows/pytest.yml
|
||||
release:
|
||||
name: Release pushed tag
|
||||
needs: [tests]
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Create release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: ${{ github.ref_name }}
|
||||
run: |
|
||||
gh release create "$tag" \
|
||||
--repo="$GITHUB_REPOSITORY" \
|
||||
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
|
||||
--generate-notes
|
|
@ -10,6 +10,7 @@ from datetime import datetime
|
|||
import aiohttp
|
||||
import async_timeout
|
||||
from aiohttp import ClientResponse
|
||||
from .const import USER_AGENT
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -70,9 +71,9 @@ class IrmKmiApiClient:
|
|||
) -> any:
|
||||
"""Get information from the API."""
|
||||
if headers is None:
|
||||
headers = {'User-Agent': 'github.com/jdejaegh/irm-kmi-ha'}
|
||||
headers = {'User-Agent': USER_AGENT}
|
||||
else:
|
||||
headers['User-Agent'] = 'github.com/jdejaegh/irm-kmi-ha'
|
||||
headers['User-Agent'] = USER_AGENT
|
||||
|
||||
try:
|
||||
async with async_timeout.timeout(60):
|
||||
|
|
|
@ -159,3 +159,5 @@ IRM_KMI_NAME: Final = {
|
|||
}
|
||||
|
||||
WEEKDAYS = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
|
||||
|
||||
USER_AGENT: Final = 'github.com/jdejaegh/irm-kmi-ha 0.2.28'
|
|
@ -3,7 +3,7 @@ import logging
|
|||
import xml.etree.ElementTree as ET
|
||||
from typing import List
|
||||
|
||||
from custom_components.irm_kmi.const import POLLEN_LEVEL_TO_COLOR, POLLEN_NAMES
|
||||
from .const import POLLEN_LEVEL_TO_COLOR, POLLEN_NAMES
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
|
18
pyproject.toml
Normal file
18
pyproject.toml
Normal file
|
@ -0,0 +1,18 @@
|
|||
[tool.bumpver]
|
||||
current_version = "0.2.28"
|
||||
version_pattern = "MAJOR.MINOR.PATCH"
|
||||
commit_message = "bump version {old_version} -> {new_version}"
|
||||
tag_message = "{new_version}"
|
||||
tag_scope = "default"
|
||||
pre_commit_hook = ""
|
||||
post_commit_hook = ""
|
||||
commit = true
|
||||
tag = true
|
||||
push = true
|
||||
|
||||
[tool.bumpver.file_patterns]
|
||||
"pyproject.toml" = [
|
||||
'current_version = "{version}"',
|
||||
]
|
||||
"custom_components/irm_kmi/manifest.json" = ['"version": "{version}"']
|
||||
"custom_components/irm_kmi/const.py" = ["'github.com/jdejaegh/irm-kmi-ha {version}'"]
|
|
@ -1,6 +1,6 @@
|
|||
aiohttp==3.11.11
|
||||
aiohttp==3.11.12
|
||||
async-timeout==4.0.3
|
||||
homeassistant==2025.1.4
|
||||
homeassistant==2025.2.4
|
||||
voluptuous==0.15.2
|
||||
svgwrite==1.4.3
|
||||
aiofile==3.9.0
|
|
@ -1,5 +1,6 @@
|
|||
homeassistant==2025.1.4
|
||||
pytest_homeassistant_custom_component==0.13.205
|
||||
homeassistant==2025.2.4
|
||||
pytest_homeassistant_custom_component==0.13.214
|
||||
pytest
|
||||
freezegun
|
||||
isort
|
||||
isort
|
||||
bumpver
|
Loading…
Add table
Reference in a new issue