Arizona Public Service (APS) - Discussion and Testing #94
Replies: 2 comments
-
No concerns introducing a dependency on cryptography. As long you don't introduce a dependency on a headless browser we are good. No need to try this out in Home Assistant. As long as the included main (that you can run with If you insist on trying it out in Home Assistant, see https://developers.home-assistant.io/docs/creating_integration_manifest/#requirements |
Beta Was this translation helpful? Give feedback.
-
I took a quick look at your fork. My only comment is you need to add a dependency in pyproject.toml. Other than that I can merge it as soon as you send the PR and publish a version in PyPI which should make it easier for you to try it out in HA. |
Beta Was this translation helpful? Give feedback.
-
I'm working on implementing Arizona Public Service (APS) and I'm looking for help in testing my implementation, as well as to discuss if this approach is appropriate for this library or will it have to be a separate integration.
Discussion
APS requires the password to be encrypted using the same algorithm as JSEncrypt so I managed to mimic the encryption using the cryptography library which Home Assistant uses. To find the public RSA key used to encrypt, I'm searching through a JS file that APS provides with the keys.
I'm wondering if this approach is okay enough to be added to the library or will it be better suited as its own integration.
Testing
I've added all the files from the core integration and added them to
./config/custom_components/
.I also updated the
manifest.json
to have a version number (1.0.0) and updated the requirements to try and use my repo"requirements: ["opower @ git+https://github.com/seferino-fernandez/opower.git@main"]"
but when I restart Home Assistant and go to the custom Opower Integration, Arizona Public Service is never shown in the UI and never returned from the get_supported_utility_names function. I don't see any errors or warnings in the logs so I'm having trouble figuring out what might be the issue.Is there something I may be missing when trying to test my fork of the Opower library with the Home Assistant Opower integration?
Fork: https://github.com/seferino-fernandez/opower
Thanks for the help!
Beta Was this translation helpful? Give feedback.
All reactions