* 1. Better exceptions for ports that are used by us or other components.
2. Improve tracing to understand failures better.
* Use the right exception class
* Hub refactor:
As discussed in: https://github.com/thecode/ha-rpi_gpio/discussions/325 :
1. Each entity will do its own registration.
2. State can not be changed before we register for fd changes.
3. No need to call get_line_value from events.
4. Cover was changed to use the async APIs
* Additional changes:
1. Add validationt to switch __init__ so if the line is busy it will fail early and not in async_added_to_hass
2. Remove the need to send to hub the HA entities. This makes the hub more generic.
3. Fix cover initial state to be read from the binary sensor instead of assuming the cover is closed.
Multiple improvments:
1. Bump gpiod min version to 2.2.1 which is the latest.
2. Based on the learning from the used ports, I added detection for those cases which clear and useful errors.
3. Make it easier to load the integration twice on the same machine for testing.
1. Catch unhandled exception from update_lines
2. Add some tracing which will show if the GPIO is used by other consumers. When we have more info we will be able to add specific checks.
* Update the minimal HA supported version for the RP5 release
* Improve tracing when hub is not online. Also rename the update function to make it more clear.
* Minor trace improvement
* Remove duplicate update_lines from cover.
* Fix README to have the right integration name
* Integrate the work done by @jdeneef back to this repo (#281)
* initial setup, config_flow only
* initial setup, reading config
* renamed to ha_gpiod
* added gpiod_config
* switches working
* added invert_logic for switch
* initial setup for binarysensor added
* button working in thread
* added some timeouts to avoid resource busy
* button working! inc state
* doc update
* version nr updated in manifest
* fix for wrong state, tested invert_logic for binary_sensor
* updated docs and unique_id
* simplified tables
* found nothread solution, test a bit more first
* working without thread
* removed thread, simpeler solution
* added cover ..
* added cover to docs
* default fix relay_time and doc cleanups
* doc cleanups
* moved listener to hub, no longer blocking
* cleanups
* fixed comma in manifest file, and added version n manifest
* fix for hass.async_create_task for hass 2024.5
* Update README.md
* add rpi5 info to readme
* added gpiodevice discovery since rpi5 uses different gpiodevice from rpi3 and 4
* readme update
* readme typo, license update to mit
* fix for cover, updates from gpiod instead of calculated, readme updates
* update manifest version
* add stop_cover for cover, readme update gpiod no longer mandatory
* add github actions hacs validation
* limit hacs validation to on push
* remove brands check for github action
* updated readme, 1.0 version
* add hassfest check
* sorted manifest
* follow blueprint a bit more
* update github actions
* feat: add bias and drive mode options to switches
* updated code adding feature from askz
* add bias/drive to cover
* gpiod bias and drive added
* code cleanup more inline with gpiod, with some deprecations in the future
* highlight deprecated
* update todo
* fixed drive info in readme
* readme fix
* update readme
* retrofit
* cover update not init is_closing/opening
* readme update
* remove changelog
* update readme refer to bias for switch
* markdown cleanups, markdown render
* fix for port ranges, back to int
* rename README-DEV
* Update README.md
* alternative solution removing the loop waiting for gpio events
* cleanup of config_validations, eases backward compatibility in configs
* added changelog to readme
* changelog creation from git
* removed changelog, added generation howto to README-DEV, generate from there
* read initial status from gpio status (check bias on errors)
* typo in changelog git line
* added possible bias issue in readme
* Add persistentcy support for switches
* Make the persistent example more relevant
* removed previous persistence via gpiod
* updated sensor reading at startup
* updated readme for persistence over reboots
* fix to remove state error
* Align old configuration for sensor and switch
* Fix manifest
* Align cover configuration with old format
* Fix readme attribution
* Fix break in cover
* Manifest fix
* remove commented code
* fixed version in manifest
* Revert not needed files
* Revert LICENSE
* CR comments
* Another CR fix
* More CR comments
* Fix doc CR comments
* Update custom_components/rpi_gpio/hub.py
* Update custom_components/rpi_gpio/hub.py
* CR comments
* Fix break caused by removing manufacturer.
* Update custom_components/rpi_gpio/hub.py
* Fixed last CR comments
---------
Co-authored-by: J de Neef <6884662+jdeneef@users.noreply.github.com>
Co-authored-by: Maxime Saddok <saddok.ma@gmail.com>
Co-authored-by: gwhiteCL <whitegc5@comcast.net>
Co-authored-by: Shay Levy <levyshay1@gmail.com>
* rename update to handle_event to make it less confusion with HA naming.
* Fix cover break after my rename
* Rename update to handle_event to make it less confusion with HA naming (#287)
* rename update to handle_event to make it less confusion with HA naming.
* Fix cover break after my rename
* Merge from main (#296)
* Bump pylint from 3.3.0 to 3.3.1 (#283)
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.0...v3.3.1)
---
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>
* Bump pre-commit from 3.8.0 to 4.0.0 (#288)
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 3.8.0 to 4.0.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/v3.8.0...v4.0.0)
---
updated-dependencies:
- dependency-name: pre-commit
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>
* Bump actions/checkout from 4.2.0 to 4.2.1 (#289)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.2.0...v4.2.1)
---
updated-dependencies:
- dependency-name: actions/checkout
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>
* Bump black from 24.8.0 to 24.10.0 (#290)
Bumps [black](https://github.com/psf/black) from 24.8.0 to 24.10.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.8.0...24.10.0)
---
updated-dependencies:
- dependency-name: black
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>
* Bump pre-commit from 4.0.0 to 4.0.1 (#291)
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.0.0 to 4.0.1.
- [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.0.0...v4.0.1)
---
updated-dependencies:
- dependency-name: pre-commit
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>
* Bump mypy from 1.11.2 to 1.12.0 (#292)
Bumps [mypy](https://github.com/python/mypy) from 1.11.2 to 1.12.0.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.11.2...v1.12.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>
* Bump mypy from 1.12.0 to 1.12.1 (#295)
Bumps [mypy](https://github.com/python/mypy) from 1.12.0 to 1.12.1.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.12.0...v1.12.1)
---
updated-dependencies:
- dependency-name: mypy
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>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Integrate the fix for cover (#297)
* fix for cover
* simpler cover fix, not based on cover state
* Fix minor bug in the cover code
* Refactor cover init
---------
Co-authored-by: J de Neef <6884662+jdeneef@users.noreply.github.com>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Tomer <57483589+tomer-w@users.noreply.github.com>
Co-authored-by: J de Neef <6884662+jdeneef@users.noreply.github.com>
Co-authored-by: Maxime Saddok <saddok.ma@gmail.com>
Co-authored-by: gwhiteCL <whitegc5@comcast.net>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>