Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses shared-state initialization bugs by moving per-instance state from class attributes into proper __init__ initializers, and updating all resource value accessors and data providers to call super().__init__().
Changes:
- Add
__init__toEntityValueAccessorto initialize_dataper instance, and update all*ValueAccessorsubclasses to callsuper().__init__(). - Add
__init__toDataProviderBaseto initialize_subscriber,_status, and_resourcesper instance, and updateDummyDataProvider/DataProviderto callsuper().__init__(). - Minor formatting: insert a blank line after module docstrings across touched modules.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| PyMyGekko/resources/Vents.py | Ensure VentValueAccessor initializes base accessor state via super().__init__(). |
| PyMyGekko/resources/RoomTemps.py | Ensure RoomTempsValueAccessor initializes base accessor state via super().__init__(). |
| PyMyGekko/resources/Meteo.py | Ensure MeteoValueAccessor initializes base accessor state via super().__init__(). |
| PyMyGekko/resources/Loads.py | Ensure LoadValueAccessor initializes base accessor state via super().__init__(). |
| PyMyGekko/resources/Lights.py | Ensure LightValueAccessor initializes base accessor state via super().__init__(). |
| PyMyGekko/resources/HotWaterSystems.py | Ensure HotWaterSystemValueAccessor initializes base accessor state via super().__init__(). |
| PyMyGekko/resources/EnergyCosts.py | Ensure EnergyCostValueAccessor initializes base accessor state via super().__init__(). |
| PyMyGekko/resources/DoorInterComs.py | Ensure DoorInterComValueAccessor initializes base accessor state via super().__init__(). |
| PyMyGekko/resources/Cams.py | Ensure CamValueAccessor initializes base accessor state via super().__init__(). |
| PyMyGekko/resources/Blinds.py | Ensure BlindValueAccessor initializes base accessor state via super().__init__(). |
| PyMyGekko/resources/AlarmsLogics.py | Ensure AlarmsLogicValueAccessor initializes base accessor state via super().__init__(). |
| PyMyGekko/resources/Actions.py | Ensure ActionValueAccessor initializes base accessor state via super().__init__(). |
| PyMyGekko/resources/AccessDoors.py | Ensure AccessDoorValueAccessor initializes base accessor state via super().__init__(). |
| PyMyGekko/data_provider.py | Move provider/accessor state to instance initialization and wire super().__init__() into provider subclasses. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.