Skip to content

Commit d32c2ea

Browse files
authored
Merge pull request #219 from elad-bar/support-2024-1-0
update integration to HA v2024.1.0b0
2 parents aab376d + 390a684 commit d32c2ea

27 files changed

+501
-348
lines changed

.github/workflows/constraints.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
pip==20.3.3
2-
pre-commit==2.9.3
3-
nox==2020.12.31
1+
pip==22.2.2
2+
pre-commit==2.20.0
3+
nox==2022.8.7

.github/workflows/hassfest.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
---
2-
31
name: Validate with hassfest
42

3+
# yamllint disable-line rule:truthy
54
on:
65
push:
76
pull_request:
@@ -12,5 +11,5 @@ jobs:
1211
validate:
1312
runs-on: "ubuntu-latest"
1413
steps:
15-
- uses: "actions/checkout@v2"
14+
- uses: "actions/checkout@v3.1.0"
1615
- uses: home-assistant/actions/hassfest@master

.github/workflows/pre-commit.yaml

Lines changed: 7 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,15 @@
1-
name: Linting
1+
name: pre-commit
22

3+
# yamllint disable-line rule:truthy
34
on:
4-
push:
5-
branches:
6-
- main
7-
- master
8-
- dev
95
pull_request:
6+
push:
7+
branches: [master]
108

119
jobs:
1210
pre-commit:
1311
runs-on: ubuntu-latest
14-
name: pre-commit
1512
steps:
16-
- uses: actions/checkout@v2.3.4
17-
- uses: actions/setup-python@v2.2.1
18-
with:
19-
python-version: "3.9"
20-
- run: |
21-
pip install --constraint=.github/workflows/constraints.txt pip
22-
pip install --constraint=.github/workflows/constraints.txt pre-commit
23-
- name: Compute cache key prefix
24-
if: matrix.os != 'windows-latest'
25-
id: cache_key_prefix
26-
shell: python
27-
run: |
28-
import hashlib
29-
import sys
30-
python = "py{}.{}".format(*sys.version_info[:2])
31-
payload = sys.version.encode() + sys.executable.encode()
32-
digest = hashlib.sha256(payload).hexdigest()
33-
result = "${{ runner.os }}-{}-{}-pre-commit".format(python, digest)
34-
print("::set-output name=result::{}".format(result))
35-
- uses: actions/cache@v2.1.3
36-
if: matrix.os != 'windows-latest'
37-
with:
38-
path: ~/.cache/pre-commit
39-
key: ${{ steps.cache_key_prefix.outputs.result }}-${{ hashFiles('.pre-commit-config.yaml') }}
40-
restore-keys: |
41-
${{ steps.cache_key_prefix.outputs.result }}-
42-
- run: pre-commit run --all-files --show-diff-on-failure --color=always
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-python@v3
15+
- uses: pre-commit/action@v3.0.0

.pre-commit-config.yaml

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,73 @@
1-
---
2-
31
repos:
42
- repo: https://github.com/asottile/pyupgrade
5-
rev: v2.32.1
3+
rev: v3.15.0
64
hooks:
75
- id: pyupgrade
8-
args: [ --py39 ]
6+
args: [--py39-plus]
97
- repo: https://github.com/psf/black
10-
rev: 22.3.0
8+
rev: 23.12.1
119
hooks:
1210
- id: black
1311
args:
14-
- --safe
1512
- --quiet
16-
files: ^((homeassistant|script|tests)/.+)?[^/]+\.py$
13+
files: ^((custom_components)/.+)?[^/]+\.py$
1714
- repo: https://github.com/codespell-project/codespell
18-
rev: v2.1.0
15+
rev: v2.2.6
1916
hooks:
2017
- id: codespell
2118
args:
2219
- --ignore-words-list=hass,alot,datas,dof,dur,ether,farenheit,hist,iff,ines,ist,lightsensor,mut,nd,pres,referer,ser,serie,te,technik,ue,uint,visability,wan,wanna,withing,iam,incomfort
2320
- --skip="./.*,*.csv,*.json"
2421
- --quiet-level=2
2522
exclude_types: [csv, json]
26-
exclude: ^tests/fixtures/
27-
- repo: https://gitlab.com/pycqa/flake8
28-
rev: 3.8.4
23+
- repo: https://github.com/PyCQA/autoflake
24+
rev: v2.2.1
25+
hooks:
26+
- id: autoflake
27+
args:
28+
- --in-place
29+
- --remove-all-unused-imports
30+
- repo: https://github.com/PyCQA/flake8
31+
rev: 6.1.0
2932
hooks:
3033
- id: flake8
3134
additional_dependencies:
32-
- flake8-docstrings==1.5.0
33-
- pydocstyle==5.1.1
34-
files: ^(homeassistant|script|tests)/.+\.py$
35+
- pycodestyle>=2.10.0
36+
- pyflakes>=3.0.1
37+
# - flake8-docstrings==1.6.0
38+
# - pydocstyle==6.2.3
39+
- flake8-comprehensions>=3.10.1
40+
- flake8-noqa>=1.3.0
41+
- mccabe>=0.7.0
42+
files: ^(custom_components)/.+\.py$
3543
- repo: https://github.com/PyCQA/bandit
36-
rev: 1.7.4
44+
rev: 1.7.6
3745
hooks:
3846
- id: bandit
3947
args:
4048
- --quiet
4149
- --format=custom
42-
- --configfile=tests/bandit.yaml
43-
files: ^(homeassistant|script|tests)/.+\.py$
50+
- --configfile=bandit.yaml
51+
files: ^(custom_components)/.+\.py$
4452
- repo: https://github.com/PyCQA/isort
45-
rev: 5.10.1
53+
rev: 5.13.2
4654
hooks:
4755
- id: isort
4856
- repo: https://github.com/pre-commit/pre-commit-hooks
49-
rev: v3.2.0
57+
rev: v4.5.0
5058
hooks:
51-
- id: check-executables-have-shebangs
52-
stages: [manual]
5359
- id: check-json
5460
exclude: (.vscode|.devcontainer)
5561
- id: check-yaml
5662
- id: end-of-file-fixer
5763
- id: trailing-whitespace
5864
- id: check-added-large-files
65+
- repo: https://github.com/adrienverge/yamllint.git
66+
rev: v1.33.0
67+
hooks:
68+
- id: yamllint
69+
exclude: (.yamllint)
5970
- repo: https://github.com/pre-commit/mirrors-prettier
60-
rev: v2.6.1
71+
rev: v3.0.3
6172
hooks:
6273
- id: prettier
63-
stages: [manual]

.yamllint

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
ignore: |
2+
azure-*.yml
3+
rules:
4+
braces:
5+
level: error
6+
min-spaces-inside: 0
7+
max-spaces-inside: 1
8+
min-spaces-inside-empty: -1
9+
max-spaces-inside-empty: -1
10+
brackets:
11+
level: error
12+
min-spaces-inside: 0
13+
max-spaces-inside: 0
14+
min-spaces-inside-empty: -1
15+
max-spaces-inside-empty: -1
16+
colons:
17+
level: error
18+
max-spaces-before: 0
19+
max-spaces-after: 1
20+
commas:
21+
level: error
22+
max-spaces-before: 0
23+
min-spaces-after: 1
24+
max-spaces-after: 1
25+
comments:
26+
level: error
27+
require-starting-space: true
28+
min-spaces-from-content: 2
29+
comments-indentation:
30+
level: error
31+
document-end:
32+
level: error
33+
present: false
34+
document-start:
35+
level: error
36+
present: false
37+
empty-lines:
38+
level: error
39+
max: 1
40+
max-start: 0
41+
max-end: 1
42+
hyphens:
43+
level: error
44+
max-spaces-after: 1
45+
indentation:
46+
level: error
47+
spaces: 2
48+
indent-sequences: true
49+
check-multi-line-strings: false
50+
key-duplicates:
51+
level: error
52+
line-length: disable
53+
new-line-at-end-of-file:
54+
level: error
55+
new-lines:
56+
level: error
57+
type: unix
58+
trailing-spaces:
59+
level: error
60+
truthy:
61+
level: error

CHANGELOG.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 1.0.16
4+
5+
- Update ConfigEntry to support HA v2024.1.0b0 and above [Issue #218](https://github.com/elad-bar/ha-blueiris/issues/218)
6+
- Update pre-commit package and configuration files (updated packages)
7+
- Set minimum version of HA to be supported by HACS as 2024.1.0b0
8+
- Re-order manifest property order to support hassfest validation
9+
310
## 1.0.13
411

512
- Device and Entity registry - `async_get_registry` is deprecated, change to `async_get` [\#170](https://github.com/elad-bar/ha-blueiris/issues/170)
@@ -26,7 +33,7 @@
2633

2734
## 1.0.8
2835

29-
- Fix for 2021.9.0 Breaking Change: Custom integrations: Cameras* [\#127](https://github.com/elad-bar/ha-blueiris/issues/127)
36+
- Fix for 2021.9.0 Breaking Change: Custom integrations: Cameras\* [\#127](https://github.com/elad-bar/ha-blueiris/issues/127)
3037
- Fixed Info logging message when setting profile and schedule
3138

3239
## 1.0.7
@@ -36,17 +43,20 @@
3643
## 2021-07-31 (1.0.6)
3744

3845
**Fixed bugs:**
39-
- Cannot import MQTT Message (HA Core Breaking Change) >=2021.8.* [\#120](https://github.com/elad-bar/ha-blueiris/issues/120)
46+
47+
- Cannot import MQTT Message (HA Core Breaking Change) >=2021.8.\* [\#120](https://github.com/elad-bar/ha-blueiris/issues/120)
4048

4149
## 2021-07-31 (1.0.6b2)
4250

4351
**Fixed bugs:**
44-
- Cannot import MQTT Message (HA Core Breaking Change) >=2021.8.* [\#120](https://github.com/elad-bar/ha-blueiris/issues/120)
52+
53+
- Cannot import MQTT Message (HA Core Breaking Change) >=2021.8.\* [\#120](https://github.com/elad-bar/ha-blueiris/issues/120)
4554

4655
## 2021-07-30 (1.0.6b1)
4756

4857
**Fixed bugs:**
49-
- Cannot import MQTT Message (HA Core Breaking Change) >=2021.8.* [\#120](https://github.com/elad-bar/ha-blueiris/issues/120)
58+
59+
- Cannot import MQTT Message (HA Core Breaking Change) >=2021.8.\* [\#120](https://github.com/elad-bar/ha-blueiris/issues/120)
5060

5161
## 2021-02-16
5262

@@ -111,6 +121,7 @@
111121
- Improved generate configuration file process
112122

113123
**Fixed bugs:**
124+
114125
- Fixed - Generate configuration files
115126

116127
## 2020-07-17
@@ -251,9 +262,9 @@
251262
**Fixed bugs:**
252263

253264
- Fix issue [\#37](https://github.com/elad-bar/ha-blueiris/issues/37) - Restart of HASS causes all entities to be renamed to defaults <br/>
254-
improving the way the component is loading, unloading and discover new entities (sensors, camera and switch). <br/>
255-
the main issue as reported in the past was that once changing the entity_id / name it will return to the original after restart. <br/>
256-
another issue that caused by the way it was handled, upon changing the options (settings) - it took few seconds to present the new entities and sometimes it happened only after restart. <br/>
265+
improving the way the component is loading, unloading and discover new entities (sensors, camera and switch). <br/>
266+
the main issue as reported in the past was that once changing the entity_id / name it will return to the original after restart. <br/>
267+
another issue that caused by the way it was handled, upon changing the options (settings) - it took few seconds to present the new entities and sometimes it happened only after restart. <br/>
257268
In that version, the entity_id, name will remain as manually set and changes of options will take place immediately
258269

259270
## 2020-02-28
@@ -265,14 +276,12 @@
265276
- Fix issue [\#27](https://github.com/elad-bar/ha-blueiris/issues/27) - when changing switch it doesn't work smoothly and after restart
266277
- Resources (strings) fixed
267278

268-
269279
**Implemented enhancements:**
270280

271281
- Username and password are now optional, if not set, will not create profile's switches
272282
- Added validation for host, port and SSL state in configuration, if URL is not accessible, will throw an error
273283
- Validate administrator username and password, in case entered wrong credentials, will throw an error
274284

275-
276285
## 2020-02-07 - v2.0.0 - Breaking change!!!
277286

278287
**Implemented enhancements:**

0 commit comments

Comments
 (0)