Skip to content

Add network resource button entities to ISY994 and bump PyISY to 3.0.12#85429

Merged
bdraco merged 5 commits into
home-assistant:devfrom
shbatm:isy994_networking
Jan 9, 2023
Merged

Add network resource button entities to ISY994 and bump PyISY to 3.0.12#85429
bdraco merged 5 commits into
home-assistant:devfrom
shbatm:isy994_networking

Conversation

@shbatm
Copy link
Copy Markdown
Contributor

@shbatm shbatm commented Jan 8, 2023

Breaking change

The isy994.run_network_resource has been deprecated and will be removed in a future release. Network Resources have been added as button entities and those should be used instead.

Proposed change

Add full support for the ISY/IoX's Network Resources by creating button entities to trigger each resource. Previously these were only possible to control from Home Assistant using the integration-specific service isy994.run_network_resource. These are being added as buttons because they are one-shot executions with no return values (they operate similar to the rest_command integration).

Resources will be added to a single "ISY Networking Module" device entry as this is a separate and optional module in the ISY.

Also included in this PR:

  1. Move isy.configuration dict keys to string literals where used.
  2. Performance increases for newer UDI hardware by increasing the simulatneous connections available when the module initializes and determines it is not on legacy hardware (happens within PyISY module)
  3. Bump PyISY to 3.0.12 to add expected keys to the NetworkCommand class and add (2) above. Full change log: https://github.com/automicus/PyISY/releases/tag/v3.0.12

Note when testing: there appears to be a bug in the most recent version of IoX firmware where network resources will report an error when called, but will be called successfully. This shows up as a warning in the log only, and no changes will be required here once UDI fixes the issue on their end.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@shbatm shbatm requested a review from bdraco as a code owner January 8, 2023 14:25
@home-assistant home-assistant Bot added cla-signed code-quality dependency Pull requests marked as a dependency upgrade deprecation Indicates a breaking change to happen in the future integration: isy994 new-feature labels Jan 8, 2023
@home-assistant
Copy link
Copy Markdown
Contributor

home-assistant Bot commented Jan 8, 2023

Hey there @bdraco, mind taking a look at this pull request as it has been labeled with an integration (isy994) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of isy994 can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign isy994 Removes the current integration label and assignees on the issue, add the integration domain after the command.

Comment thread homeassistant/components/isy994/button.py Outdated
Comment thread homeassistant/components/isy994/button.py Outdated
Comment thread homeassistant/components/isy994/button.py Outdated
Comment thread homeassistant/components/isy994/button.py Outdated
@bdraco
Copy link
Copy Markdown
Member

bdraco commented Jan 8, 2023

Looks good. Minor comments above.

Testing now

@bdraco
Copy link
Copy Markdown
Member

bdraco commented Jan 9, 2023

I created a few but they aren't showing up. Trying to do some debugging now

Screenshot 2023-01-08 at 3 32 59 PM

@bdraco
Copy link
Copy Markdown
Member

bdraco commented Jan 9, 2023

Nevermind it works great. Its under Networking Module

Comment thread homeassistant/components/isy994/button.py
@bdraco bdraco merged commit a8cdb86 into home-assistant:dev Jan 9, 2023
@bdraco
Copy link
Copy Markdown
Member

bdraco commented Jan 9, 2023

Thanks @shbatm

tronikos pushed a commit to tronikos/home-assistant-core that referenced this pull request Jan 9, 2023
shbatm added a commit to shbatm/home-assistant-core that referenced this pull request Jan 9, 2023
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 10, 2023
@shbatm shbatm deleted the isy994_networking branch January 11, 2023 09:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

by-code-owner cla-signed code-quality dependency Pull requests marked as a dependency upgrade deprecation Indicates a breaking change to happen in the future integration: isy994 new-feature Quality Scale: No score

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants