Adds Orange Pi GPIO platform#22541
Adds Orange Pi GPIO platform#22541rohankapoorcom merged 7 commits intohome-assistant:devfrom pascallj:orangepi_gpio
Conversation
|
Successor of #19732. |
rohankapoorcom
left a comment
There was a problem hiding this comment.
I've finished a first pass review. It's a great start :)
Please see the comments with detailed changes requested.
|
Thanks for your first review, I appreciate your optimisim :). |
|
It is harsh time for new integration as we are doing refactoring, we are now requesting all components has to have a manifest file. Please rebase you branch against current You may need to do more rebase in the next few days as we are still in the progress of refactoring. |
|
As I could not work out why the output is written in the initialization stage of the cover platform, I removed the platform for now so we can get this through. Platform can be added at a later stage. Also I rebased a couple days ago but as far as I can see it is still up-to-date with the refactoring process. |
|
The changes you requested for the switch platform have the same issue as the cover platform. I assume the fix is simple, but needs further testing before I can verify that. Therefore I will limit this PR to just one platform, the binary_sensor, for now (as instructed by the component checklist). |
|
Any other changes I have to make to this PR? |
|
Hi @pascallj - thanks for your patience as we went through a major refactor during the process of you writing your PR. I’ve marked two lines that need to be removed, but otherwise this looks good to me! I did try to commit the change myself and merge this in, but your fork does not allow HA members to push to it. Once you get those lines removed and the build passes, we’ll be all set here 🎉 🎉 🎉 . |
|
Thank you, I removed those lines. Waiting for the tests to pass :) |
MartinHjelmare
left a comment
There was a problem hiding this comment.
Please open a new PR where we can address the comments.
|
|
||
| _LOGGER = logging.getLogger(__name__) | ||
|
|
||
| PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(PORT_SCHEMA) |
There was a problem hiding this comment.
Since we know that more platforms are likely incoming, it would be better to have all config under the integrating component section, and set up platforms via discovery helper. See the netgear_lte component for example.
Description:
This component adds support for GPIO on Orange Pi boards. It uses
rpi_gpioas base without support for port debouncing or pull-up resistors. These features are (currently) not supported by the OPi.GPIO library. This library uses SYSFS to access the GPIOs and therefore need some additional steps to get working in HASS (see documentation).As there exist different pinouts for different boards, an additional
pinmodeattribute has been added to support all boards supported by the library (see documentation).Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#9072
Example entry for
configuration.yaml(if applicable):Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.If the code does not interact with devices: