Replace time selects with native time entities - #2122
Merged
Conversation
Closed
Owner
|
I think this is a bit messy trying to map in selects as time entities. |
Contributor
Author
|
@wills106 you are right about that there might be a better way to do it. What do you think about my recent changes? I updated the files from this PR to a cleaner version. |
Owner
|
Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Replace legacy charger/discharger time dropdowns with native Home Assistant TimeEntity entities.
On SolaX Gen4, the device page previously exposed 16 time settings as select dropdowns with 1440 minute options each. That produced 23000 time options just for these controls, and the measured HA device page rendered 23000 dropdown items overall, with about 71k and 70k elements. This caused noticeable lag when opening the device UI.
This change removes the legacy time selects, reuses the existing Modbus payload mappings for native time.* entities, and adds the missing Modbus read/default handling so migrated time entities can decode raw register values correctly instead of staying unavailable.
@wills106 this is your baby as you recently changed it. This is just a suggestion to fix #2119
But be aware this changes the affected entities from select.* to time.*. Existing dashboards, automations, scripts, or templates that reference the old select entity IDs will need to be updated to the new time entities.