Skip to content

Commit

Permalink
Merge pull request #219 from elad-bar/support-2024-1-0
Browse files Browse the repository at this point in the history
update integration to HA  v2024.1.0b0
  • Loading branch information
kramttocs committed Dec 31, 2023
2 parents aab376d + 390a684 commit d32c2ea
Show file tree
Hide file tree
Showing 27 changed files with 501 additions and 348 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pip==20.3.3
pre-commit==2.9.3
nox==2020.12.31
pip==22.2.2
pre-commit==2.20.0
nox==2022.8.7
5 changes: 2 additions & 3 deletions .github/workflows/hassfest.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---

name: Validate with hassfest

# yamllint disable-line rule:truthy
on:
push:
pull_request:
Expand All @@ -12,5 +11,5 @@ jobs:
validate:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- uses: "actions/checkout@v3.1.0"
- uses: home-assistant/actions/hassfest@master
41 changes: 7 additions & 34 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,15 @@
name: Linting
name: pre-commit

# yamllint disable-line rule:truthy
on:
push:
branches:
- main
- master
- dev
pull_request:
push:
branches: [master]

jobs:
pre-commit:
runs-on: ubuntu-latest
name: pre-commit
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/setup-python@v2.2.1
with:
python-version: "3.9"
- run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip install --constraint=.github/workflows/constraints.txt pre-commit
- name: Compute cache key prefix
if: matrix.os != 'windows-latest'
id: cache_key_prefix
shell: python
run: |
import hashlib
import sys
python = "py{}.{}".format(*sys.version_info[:2])
payload = sys.version.encode() + sys.executable.encode()
digest = hashlib.sha256(payload).hexdigest()
result = "${{ runner.os }}-{}-{}-pre-commit".format(python, digest)
print("::set-output name=result::{}".format(result))
- uses: actions/cache@v2.1.3
if: matrix.os != 'windows-latest'
with:
path: ~/.cache/pre-commit
key: ${{ steps.cache_key_prefix.outputs.result }}-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ steps.cache_key_prefix.outputs.result }}-
- run: pre-commit run --all-files --show-diff-on-failure --color=always
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0
56 changes: 33 additions & 23 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,63 +1,73 @@
---

repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.32.1
rev: v3.15.0
hooks:
- id: pyupgrade
args: [ --py39 ]
args: [--py39-plus]
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 23.12.1
hooks:
- id: black
args:
- --safe
- --quiet
files: ^((homeassistant|script|tests)/.+)?[^/]+\.py$
files: ^((custom_components)/.+)?[^/]+\.py$
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
rev: v2.2.6
hooks:
- id: codespell
args:
- --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
- --skip="./.*,*.csv,*.json"
- --quiet-level=2
exclude_types: [csv, json]
exclude: ^tests/fixtures/
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.1
hooks:
- id: autoflake
args:
- --in-place
- --remove-all-unused-imports
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies:
- flake8-docstrings==1.5.0
- pydocstyle==5.1.1
files: ^(homeassistant|script|tests)/.+\.py$
- pycodestyle>=2.10.0
- pyflakes>=3.0.1
# - flake8-docstrings==1.6.0
# - pydocstyle==6.2.3
- flake8-comprehensions>=3.10.1
- flake8-noqa>=1.3.0
- mccabe>=0.7.0
files: ^(custom_components)/.+\.py$
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
rev: 1.7.6
hooks:
- id: bandit
args:
- --quiet
- --format=custom
- --configfile=tests/bandit.yaml
files: ^(homeassistant|script|tests)/.+\.py$
- --configfile=bandit.yaml
files: ^(custom_components)/.+\.py$
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v4.5.0
hooks:
- id: check-executables-have-shebangs
stages: [manual]
- id: check-json
exclude: (.vscode|.devcontainer)
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-added-large-files
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.33.0
hooks:
- id: yamllint
exclude: (.yamllint)
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.1
rev: v3.0.3
hooks:
- id: prettier
stages: [manual]
61 changes: 61 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
ignore: |
azure-*.yml
rules:
braces:
level: error
min-spaces-inside: 0
max-spaces-inside: 1
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
brackets:
level: error
min-spaces-inside: 0
max-spaces-inside: 0
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
colons:
level: error
max-spaces-before: 0
max-spaces-after: 1
commas:
level: error
max-spaces-before: 0
min-spaces-after: 1
max-spaces-after: 1
comments:
level: error
require-starting-space: true
min-spaces-from-content: 2
comments-indentation:
level: error
document-end:
level: error
present: false
document-start:
level: error
present: false
empty-lines:
level: error
max: 1
max-start: 0
max-end: 1
hyphens:
level: error
max-spaces-after: 1
indentation:
level: error
spaces: 2
indent-sequences: true
check-multi-line-strings: false
key-duplicates:
level: error
line-length: disable
new-line-at-end-of-file:
level: error
new-lines:
level: error
type: unix
trailing-spaces:
level: error
truthy:
level: error
27 changes: 18 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 1.0.16

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

## 1.0.13

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

## 1.0.8

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

## 1.0.7
Expand All @@ -36,17 +43,20 @@
## 2021-07-31 (1.0.6)

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

- Cannot import MQTT Message (HA Core Breaking Change) >=2021.8.\* [\#120](https://github.com/elad-bar/ha-blueiris/issues/120)

## 2021-07-31 (1.0.6b2)

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

- Cannot import MQTT Message (HA Core Breaking Change) >=2021.8.\* [\#120](https://github.com/elad-bar/ha-blueiris/issues/120)

## 2021-07-30 (1.0.6b1)

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

- Cannot import MQTT Message (HA Core Breaking Change) >=2021.8.\* [\#120](https://github.com/elad-bar/ha-blueiris/issues/120)

## 2021-02-16

Expand Down Expand Up @@ -111,6 +121,7 @@
- Improved generate configuration file process

**Fixed bugs:**

- Fixed - Generate configuration files

## 2020-07-17
Expand Down Expand Up @@ -251,9 +262,9 @@
**Fixed bugs:**

- Fix issue [\#37](https://github.com/elad-bar/ha-blueiris/issues/37) - Restart of HASS causes all entities to be renamed to defaults <br/>
improving the way the component is loading, unloading and discover new entities (sensors, camera and switch). <br/>
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/>
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/>
improving the way the component is loading, unloading and discover new entities (sensors, camera and switch). <br/>
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/>
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/>
In that version, the entity_id, name will remain as manually set and changes of options will take place immediately

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


**Implemented enhancements:**

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


## 2020-02-07 - v2.0.0 - Breaking change!!!

**Implemented enhancements:**
Expand Down
Loading

0 comments on commit d32c2ea

Please sign in to comment.