Consolidate device info and clean-up ISY994 code base#85657
Conversation
|
Hey there @bieniu, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
|
Hey there @bdraco, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Remove unnecessary DOMAIN from function
d9fb756 to
a2f29ce
Compare
|
@home-assistant unassign gios |
|
@bdraco you can pull the |
|
Tested to make sure no devices left behind: This branch: Dev @ 3ee73f0: Prod @ 2023.1.1 (no variable or network entities): |
| hass_isy_data[ISY_NODES] = {p: [] for p in (NODE_PLATFORMS + [SENSOR_AUX])} | ||
| hass_isy_data[ISY_ROOT_NODES] = {p: [] for p in ROOT_NODE_PLATFORMS} | ||
| hass_isy_data[ISY_PROGRAMS] = {p: [] for p in PROGRAM_PLATFORMS} | ||
| hass_isy_data[ISY_VARIABLES] = {p: [] for p in VARIABLE_PLATFORMS} | ||
| hass_isy_data[ISY_NET_RES] = [] | ||
| hass_isy_data[ISY_DEVICES] = {} |
There was a problem hiding this comment.
For a future PR: This might be a bit easier to manage as a top level dataclass instead of a dict so you can use named attributes instead. lookin has an example of this in models
There was a problem hiding this comment.
@bdraco Good call. I may go ahead and do that before I push the next PR for on level sensors.
Thanks for reviewing all these. I have a few more on deck coming your way while I have time.
|
codecov/config flow is unrelated to this PR (there are no config flow changes here) |



Proposed change
PR accomplishes several items centered around cleanup of the ISY994 codebase--there should be no change in end-user functionality for this change, only backend cleanup and efficiencies.
DeviceInfoon config entry loading and store in adict.ISY994_string literals toISY_(follow-up to Update ISY994 integration to be model agnostic #85017).import DOMAIN as ISY994_DOMAINin favor ofimport DOMAIN(follow-up Use Platform enum and remove DOMAIN as X imports in ISY994 #85341)hass.data["isy994"]dict organization to be more consistent, store root/parent nodes, and prep for adding enable swtiches.unique_ids and fix brokencleanup_entitiesservice function.unique_idsforasync_remove_config_entry_device_attrduring init.buttonentity classes.Type of change
Additional information
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.To help with the load of incoming pull requests: