We previously checked Integration.config_flow to see if we should
pre-import the config flow, but this is now always set for some
integration like `homeassistant_green`, `hassio`, etc. Instead
we can add it to the rest of the platforms since we already know
which files exist. This simplifies the logic and ensures the pre-import
still happens if the file is there even if its not listed in the
manifest
`2024-03-04 22:54:31.906 DEBUG (MainThread) [homeassistant.loader] Importing platforms for homeassistant_green executor=[config_flow] loop=[] took 2.74s`
* Migrate remaining calls in config modules to async_get_component
There were a few cases that were still using get_component that
could have done blocking I/O in the event loop, although it
was unlikely.
The caching check in async_get_component has been moved
up to avoid creating the future if the module is already in
the cache
* fix one more
* Handle case where deCONZ light entity might not report a supported color mode
* If in an unknown color mode set ColorMode.UNKNOWN
* Fix comment from external discussion
* add deprecaction
* Deprecate old config options for mqtt json light
* Do not deprecate brightness flag
* Enable brightness support by default
* Keep `false` as default for brightness flag
* Add warnings and register issue
* log warning and register on use of color_mode flag
* Remove redundant cv.deprecated logging + follow up comments
Some of the data we had to search for was already available
in a dict or underlying data structure. Make it available
instead of having to build it every time.
There are more places these can be used, but I only did
the device registry cleanup for now
* Adding Energy
* Adding Energy
* Work in progress
* Add fixtures
* Add product info
* Add sensors
* Add icons
* Update metadata
* Use SensorEntityDescription for Energy
* Use ENERGY_STORAGE
* Add tests
* Fix coverage
* Update wall connector precision and units
* Change devices
* Fix serial number
* Add icons and VIN to wall connector
* Fix serial number again
* Update snapshots
* Use timestamp for minutes to arrival
* Cleanup snapshot
* Improvements
* Update fixture
* Add "code" to translations
* Add "code" to snapshot
* Use async_add_entities once
* Disable a bunch of sensors
* Ruff
* Improve fixture and test coverage
* Regen Snapshots
* Add init to coordinator
* Add 'issues' template function for listing active issues.
* Add issue template function test
* Add 'issue' template function for getting specific issue by domain and issue_id
* Remove comment
* Fix function description
* Remove reduntant function,
Fix tests
* remove pass_context
* remove issues filter
Co-authored-by: Erik Montnemery <erik@montnemery.com>
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Import in the executor by default for core integration
* merge correct branch in
* Group loading of platforms in the import executor
* adjust test
* remove other pr
* Fix async_prepare_setup_platform test
The message changed because the order changed but was not caught before
merge because it required the combination of PRs to change
the error message
* fix
* tweak
* fix
* self review
* review
* fix hue mocking
* Update homeassistant/loader.py
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* lint
* Fix async_get_component loading in the executor when the module is already loaded
The sys.modules check was incorrect (only on dev)
* fix
* Avoid multiple executor jobs with concurrent calls to async_get_component
Return a future that can be awaited if the component is
curently being loaded
* adjust
* coverage
* coverage
* concurrent platforms load test
* doc strings
* coverage
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Add support for local (lan) panel integration
* Fix merge conflicts
* Remove executable flag from non-executable files
* Fix tests
* Update homeassistant/components/elmax/__init__.py
Shorten comment
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Fix typehint
* Rename DummyPanel into DirectPanel
* Update homeassistant/components/elmax/__init__.py
Rewording
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/elmax/__init__.py
Rewording
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Refactor option step into menu step
* Change requirement statement
* Refactor dictionary key entries to use existing constants
* Align step names to new constants
* Align step names to new constants amd align tests
* Align step names to new constants amd align tests
* Align step names to new constants
* Simplify logic to handle entire entry instead of a portion of the state
* Simplify working mode checks
* Add data_description dictionary to better explain SSL and FOLLOW_MDSN options
* Add support for local (lan) panel integration
* Fix merge conflicts
* Remove executable flag from non-executable files
* Fix tests
* Update homeassistant/components/elmax/__init__.py
Shorten comment
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Fix typehint
* Rename DummyPanel into DirectPanel
* Update homeassistant/components/elmax/__init__.py
Rewording
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/elmax/__init__.py
Rewording
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Refactor option step into menu step
* Change requirement statement
* Refactor dictionary key entries to use existing constants
* Align step names to new constants
* Align step names to new constants amd align tests
* Align step names to new constants amd align tests
* Align step names to new constants
* Simplify logic to handle entire entry instead of a portion of the state
* Simplify working mode checks
* Add data_description dictionary to better explain SSL and FOLLOW_MDSN options
* Add newline at end of file
* Remove CONF_ELMAX_MODE_DIRECT_FOLLOW_MDNS option
* Fix Ruff pre-check
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update System Bridge to support version 4.x.x and above
Update systembridgeconnector to version 4.0.0.dev4
Update system_bridgeconnector version to 4.0.0.dev6
Refactor WebSocket client handling in config_flow.py
Update strings
Update data handling
Add default field values to SystemBridgeCoordinatorData
Add version check and issue creation for unsupported System Bridge versions
Update coordinator.py to set disks and memory to None
Update system bridge coordinator to use token instead of API key
Update systembridgeconnector version to 4.0.0.dev7
Update systembridgeconnector version to 4.0.0.dev8
Update systembridgeconnector version to 4.0.0.dev9
Changes
Update units
Fix GPU memory calculation in sensor.py
Update GPU memory unit of measurement
Add translation keys for binary sensor names
Cleanup
Add async_migrate_entry function for entry migration
Update systembridgeconnector version to 4.0.0.dev10
Update systembridgeconnector version to 4.0.0.dev11
Add version check and authentication handling
Update token description in strings.json
Fix skipping partitions without data in system_bridge sensor
Update systembridgeconnector version to 4.0.0.dev12
Update systembridgeconnector version to 4.0.0
Add check for unsupported version of System Bridge
Update systembridgeconnector version to 4.0.1
Update debug log message in async_setup_entry function
Remove debug log statement
Fixes
Update key to token
Update tests
Update tests
Remove unused import in test_config_flow.py
Remove added missing translations for another PR
Refactor CPU power per CPU calculation
Make one liner into lambda
Refactors
Fix exception type in async_setup_entry function
Move checks to class and set minor version
Remove unnecessary comment in gpu_memory_free function
Remove translation_key for memory_used_percentage sensor
Reverse string change
Update token placeholder in strings.json
Remove suggested_display_precision from sensor descriptions
Remove suggested_display_precision from GPU sensor setup
Refactor sensor code
* Update migrate entry
* Refactor GPU-related functions to use a decorator
* Move per cpu functions to use decorator
* Refactor functions to use decorators for data availability
* Remove CONF_API_KEY from config entry data
* Add test for migration
* Refactor import statement in test_config_flow.py
Since config_entries always requires the config_flow to be loaded
to check for migrations, load it if we know it exists when loading
the underlying integration
* Split up hassio coordinator and data into new file to allow preload
Since we cannot mark hassio as having a config_flow, it will
not get preloaded and since cloud will almost always load right
after it and block the import executor, we want to preload
the hassio config_flow and platform modules so the other
dependants can continue on while cloud is being imported
to not delay startup
* tweak
* tweak