ISY994 migration to PyISY v2 (Structure Changes to enable upgrade, Part 1)#35212
ISY994 migration to PyISY v2 (Structure Changes to enable upgrade, Part 1)#35212bdraco merged 3 commits intohome-assistant:devfrom shbatm:isy994_v2_pr1
Conversation
- **BREAKING CHANGE**: The following device node type have changed platforms to correct their categorization. Some entities will now show up under a different (correctted) platform (e.g. switch to binary_sensor, etc.).
- New Binary Sensor Types:
- "BinaryControl (moved from SWITCH)" ,
- "BinaryControl_ADV" (moved from SWITCH; IOLinc Sensor),
- "EZIO2x4_Input" (moved from SWITCH),
- "EZRAIN_Input" (moved from SWITCH),
- "OnOffControl" (moved from SWITCH),
- "OnOffControl_ADV" (Added; Thermostat Running Sensors),
- Insteon Types: "7.0.", "7.13." (IOLinc/EZIO Sensors)
- IOLinc sensor/control logic will be updated in PR#4 to sort them correctly into two different platforms.
- New Sensor Types:
- "EZIO2x4_Input_ADV" (moved from SWITCH, ADC input on EZIO).
- New Lock Types:
- Insteon Type "4.64." added.
- New Switch Types:
- "DimmerSwitchOnly" (moved from LIGHT - on/off switches, non-dimmable),
- "DimmerSwitchOnly_ADV" (moved from LIGHT - on/off switches, non-dimmable),
- "RemoteLinc2" (moved from LIGHT - only report button presses as events, otherwise uncontrollable devices),
- "RemoteLinc2_ADV" (moved from LIGHT - only report button presses as events, otherwise uncontrollable devices),
- Insteon Types: "0.16.", "7.3.255.", "9.10." added based on user feedback.
- Move constants to separate file.
- Consolidate Logging to Constants file.
- Use Home Assistant Constants where possible.
- Use string literals where possible.
- Rename "domain" to "platform" in most places.
- Add additional device support (NODE_FILTER updates).
|
The breaking changes section is what we publish in the release notes so everything the user needs to know about should be in there. |
|
Tested and verified all of my devices are still working. Nice cleanup! |
|
The CI is likely going to find a few |
bdraco
left a comment
There was a problem hiding this comment.
Please rework the breaking changes section to be more user consumable, and small items with the programs code.
Updated breaking changes section. Please take a look if that's satisfactory.
I think they show up in the later ones with more "new" code. I know it fixed a few things on |
LGTM. Thanks for adjusting.
Excellent. I think I'm too used to doing reviews where the submitter does not have all the pre-commit hooks working. 👍 |
|
@shbatm Please, add your GitHub username to the For more information about "code owners", see: Architecture Decision Record 0008: Code owners. |
|
Updated code owners. |
|
Doing some more manual testing and will merge if everything is ok |
|
Motions sensors still working as expected (these are always the most problematic on isy) |
|
Everything else looks good as well. |
Breaking change
Sorting of certain devices based on the ISY's
Node Def IDandInsteon Typeproperties have been corrected to match the ISY's provided device categories, as well as user feedback of incorrect sorting for specific devices. As a result, some entities that were incorrectly categorized will now appear under a different platform (e.g. switch to binary_sensor, light to switch, etc.).The following device node types have changed platforms to correct their categorization.
SWITCH->BINARY_SENSOR)SWITCH->BINARY_SENSOR; IOLinc Sensor)SWITCH->BINARY_SENSOR)SWITCH->BINARY_SENSOR)SWITCH->BINARY_SENSOR)SWITCH->SENSOR, Analog input on EZIO).LIGHT->SWITCH),LIGHT->SWITCH),BINARY_SENSORS: "7.0.", "7.13." (IOLinc/EZIO Sensors)LOCKS: "4.64." added.SWITCHES: "0.16.", "7.3.255.", "9.10."Proposed change
PyISY version 2 has been released which supports significant back-end updates but is not backwards-compatible with the current v1.1.2.
This is the first PR in a series (9 total) to include migration to PyISYv2 and "modernization" of the
isy994integration based on testing done over the past year in the HACS custom component. A preliminary version of the migration plan has been discussed with codeowner @bdraco and PyISY maintainer @OverloadUT on the PyISY repo here and is included at the bottom of this description and is open for any comments that you'd like to see changed.This specific PR includes the first of two sets of integration structure changes needed to prep for the new PyISY version and additional forthcoming features:
Type of change
Example entry for
configuration.yaml:# Example configuration.yamlAdditional information
Current Migration and Upgrade Plan
Here's my plan for merging hacs-isy994 & PyISYv2 into Home Assistant Core. I have it broken up into 9 PRs to help with reviews.
The links are to the staged commits, and will be updated with PR numbers as progressed.
isy994_controlchanges (using NodeProperty)on_levelorlast_brightnessstate when ON is called.Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale: