Add gang count and position to ra3/hwqsx control stations #130
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding 2 fields into the devices dict for RA3/HWQSX keypads/picos:
gang_position (which position the keypad resides in a multi-gang station)
gang_count (how many ganged devices are in the control station)
These fields will allow for better device/entity naming.
Currently each keypad has "Position 1" in it's name, even if it's the only keypad in that location. Even a single pico on a pedestal gets the "Position 1" added to it's name.
With these fields, we can detect if it's in a single gang, and ignore the position name.
ie "Rec Room Coffee Table Position 1 Pico" becomes "Rec Room Coffee Table Pico"
The gang_position field will allow us to convert the position to an ordinal (1st, 2nd etc) without having to parse the number out of the device_name field.