Compare commits

..

18 Commits

Author SHA1 Message Date
dependabot[bot]
e38a45ade9
Bump mypy from 1.16.1 to 1.17.0 (#376)
Bumps [mypy](https://github.com/python/mypy) from 1.16.1 to 1.17.0.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.16.1...v1.17.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-version: 1.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-22 09:55:53 +03:00
dependabot[bot]
0383c19d77
Bump flake8 from 7.2.0 to 7.3.0 (#374)
Bumps [flake8](https://github.com/pycqa/flake8) from 7.2.0 to 7.3.0.
- [Commits](https://github.com/pycqa/flake8/compare/7.2.0...7.3.0)

---
updated-dependencies:
- dependency-name: flake8
  dependency-version: 7.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-29 10:42:24 +03:00
dependabot[bot]
f9aa9b0485
Bump mypy from 1.16.0 to 1.16.1 (#371)
Bumps [mypy](https://github.com/python/mypy) from 1.16.0 to 1.16.1.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.16.0...v1.16.1)

---
updated-dependencies:
- dependency-name: mypy
  dependency-version: 1.16.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-17 00:49:20 +03:00
dependabot[bot]
49b06ffa84
Bump mypy from 1.15.0 to 1.16.0 (#368)
Bumps [mypy](https://github.com/python/mypy) from 1.15.0 to 1.16.0.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-version: 1.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 21:55:34 +03:00
dependabot[bot]
94f5e1ba18
Bump pylint from 3.3.6 to 3.3.7 (#366)
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.6 to 3.3.7.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.6...v3.3.7)

---
updated-dependencies:
- dependency-name: pylint
  dependency-version: 3.3.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-05 21:22:28 +03:00
dependabot[bot]
a9f904da77
Bump actions/setup-python from 5.5.0 to 5.6.0 (#365)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.5.0 to 5.6.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5.5.0...v5.6.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 5.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-24 21:23:18 +03:00
dependabot[bot]
7449569925
Bump flake8 from 7.1.2 to 7.2.0 (#364)
Bumps [flake8](https://github.com/pycqa/flake8) from 7.1.2 to 7.2.0.
- [Commits](https://github.com/pycqa/flake8/compare/7.1.2...7.2.0)

---
updated-dependencies:
- dependency-name: flake8
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-31 22:59:47 +03:00
dependabot[bot]
81c89d0385
Bump actions/setup-python from 5.4.0 to 5.5.0 (#363)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.4.0 to 5.5.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5.4.0...v5.5.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-25 20:49:35 +02:00
dependabot[bot]
e5a86e2593
Bump pylint from 3.3.4 to 3.3.6 (#362)
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.4 to 3.3.6.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.4...v3.3.6)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-24 21:23:10 +02:00
dependabot[bot]
7a07346934
Bump pre-commit from 4.1.0 to 4.2.0 (#361)
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v4.1.0...v4.2.0)

---
updated-dependencies:
- dependency-name: pre-commit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-24 21:18:42 +02:00
dependabot[bot]
2890971f59
Bump isort from 6.0.0 to 6.0.1 (#359)
Bumps [isort](https://github.com/PyCQA/isort) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/PyCQA/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/main/CHANGELOG.md)
- [Commits](https://github.com/PyCQA/isort/compare/6.0.0...6.0.1)

---
updated-dependencies:
- dependency-name: isort
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-03 20:50:19 +02:00
dependabot[bot]
831af93917
Bump flake8 from 7.1.1 to 7.1.2 (#358)
Bumps [flake8](https://github.com/pycqa/flake8) from 7.1.1 to 7.1.2.
- [Commits](https://github.com/pycqa/flake8/compare/7.1.1...7.1.2)

---
updated-dependencies:
- dependency-name: flake8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-17 21:51:51 +02:00
Tomer
fedab2a3c7
Bump version to 2025.2.1 (#357) 2025-02-14 21:26:11 +02:00
Tomer
89eb52ee56
Skip failed entities instead of stop loading all of them (#356)
change async_setup_platform to just skip entities with HW issues instead of throwing and skipping the rest of the entities.
2025-02-14 21:22:43 +02:00
dependabot[bot]
003993a3e5
Bump mypy from 1.14.1 to 1.15.0 (#355)
Bumps [mypy](https://github.com/python/mypy) from 1.14.1 to 1.15.0.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.14.1...v1.15.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-10 21:16:57 +02:00
dependabot[bot]
797a4522e4
Bump isort from 5.13.2 to 6.0.0 (#352)
Bumps [isort](https://github.com/pycqa/isort) from 5.13.2 to 6.0.0.
- [Release notes](https://github.com/pycqa/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pycqa/isort/compare/5.13.2...6.0.0)

---
updated-dependencies:
- dependency-name: isort
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 20:34:36 +02:00
dependabot[bot]
df4788feba
Bump pylint from 3.3.3 to 3.3.4 (#353)
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.3 to 3.3.4.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.3...v3.3.4)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 20:30:52 +02:00
dependabot[bot]
974a66e7c5
Bump black from 24.10.0 to 25.1.0 (#351)
Bumps [black](https://github.com/psf/black) from 24.10.0 to 25.1.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/24.10.0...25.1.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 20:29:46 +02:00
6 changed files with 52 additions and 43 deletions

View File

@ -23,7 +23,7 @@ jobs:
with:
fetch-depth: 2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.4.0
uses: actions/setup-python@v5.6.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies

View File

@ -52,17 +52,20 @@ async def async_setup_platform(
sensors = []
for sensor in config.get(CONF_SENSORS):
sensors.append(
GPIODBinarySensor(
hub,
sensor[CONF_NAME],
sensor[CONF_PORT],
sensor.get(CONF_UNIQUE_ID) or f"{DOMAIN}_{sensor[CONF_PORT]}_{sensor[CONF_NAME].lower().replace(' ', '_')}",
sensor.get(CONF_INVERT_LOGIC),
sensor.get(CONF_PULL_MODE),
sensor.get(CONF_BOUNCETIME)
try:
sensors.append(
GPIODBinarySensor(
hub,
sensor[CONF_NAME],
sensor[CONF_PORT],
sensor.get(CONF_UNIQUE_ID) or f"{DOMAIN}_{sensor[CONF_PORT]}_{sensor[CONF_NAME].lower().replace(' ', '_')}",
sensor.get(CONF_INVERT_LOGIC),
sensor.get(CONF_PULL_MODE),
sensor.get(CONF_BOUNCETIME)
)
)
)
except Exception as e:
_LOGGER.error(f"Failed to add binary sensor {sensor[CONF_NAME]} for port {sensor[CONF_PORT]}: {e}")
async_add_entities(sensors)

View File

@ -71,21 +71,24 @@ async def async_setup_platform(
invert_relay = config[CONF_INVERT_RELAY]
covers = []
for cover in config.get(CONF_COVERS):
covers.append(
GPIODCover(
hub,
cover[CONF_NAME],
cover.get(CONF_RELAY_PIN),
relay_time,
invert_relay,
"AS_IS",
"PUSH_PULL",
cover.get(CONF_STATE_PIN),
state_pull_mode,
invert_state,
cover.get(CONF_UNIQUE_ID) or f"{DOMAIN}_{cover.get(CONF_RELAY_PIN)}_{cover[CONF_NAME].lower().replace(' ', '_')}",
try:
covers.append(
GPIODCover(
hub,
cover[CONF_NAME],
cover.get(CONF_RELAY_PIN),
relay_time,
invert_relay,
"AS_IS",
"PUSH_PULL",
cover.get(CONF_STATE_PIN),
state_pull_mode,
invert_state,
cover.get(CONF_UNIQUE_ID) or f"{DOMAIN}_{cover.get(CONF_RELAY_PIN)}_{cover[CONF_NAME].lower().replace(' ', '_')}",
)
)
)
except Exception as e:
_LOGGER.error(f"Failed to add cover {cover[CONF_NAME]} for port {cover.get(CONF_RELAY_PIN)}:{cover.get(CONF_STATE_PIN)}: {e}")
async_add_entities(covers)

View File

@ -7,5 +7,5 @@
"iot_class": "local_push",
"issue_tracker": "https://github.com/thecode/ha-rpi_gpio/issues",
"requirements": [ "gpiod>=2.2.1" ],
"version": "2025.2.0"
"version": "2025.2.1"
}

View File

@ -56,18 +56,21 @@ async def async_setup_platform(
switches = []
for switch in config.get(CONF_SWITCHES):
switches.append(
GPIODSwitch(
hub,
switch[CONF_NAME],
switch[CONF_PORT],
switch.get(CONF_UNIQUE_ID) or f"{DOMAIN}_{switch[CONF_PORT]}_{switch[CONF_NAME].lower().replace(' ', '_')}",
switch.get(CONF_INVERT_LOGIC),
switch.get(CONF_PULL_MODE),
switch.get(CONF_DRIVE),
switch[CONF_PERSISTENT]
try:
switches.append(
GPIODSwitch(
hub,
switch[CONF_NAME],
switch[CONF_PORT],
switch.get(CONF_UNIQUE_ID) or f"{DOMAIN}_{switch[CONF_PORT]}_{switch[CONF_NAME].lower().replace(' ', '_')}",
switch.get(CONF_INVERT_LOGIC),
switch.get(CONF_PULL_MODE),
switch.get(CONF_DRIVE),
switch[CONF_PERSISTENT]
)
)
)
except Exception as e:
_LOGGER.error(f"Failed to add switch {switch[CONF_NAME]} for port {switch[CONF_PORT]}: {e}")
async_add_entities(switches)

View File

@ -1,7 +1,7 @@
black==24.10.0
flake8==7.1.1
isort==5.13.2
mypy==1.14.1
pre-commit==4.1.0
black==25.1.0
flake8==7.3.0
isort==6.0.1
mypy==1.17.0
pre-commit==4.2.0
pydocstyle==6.3.0
pylint==3.3.3
pylint==3.3.7