* Reapply "Add support for subentries to config entries" (#133470) (#136061)
* Reapply "Add support for subentries to config entries" (#133470)
This reverts commit ecb3bf79f32a2e25d141ff467e5958826ed9fc3a.
* Update test snapshot
* Add config subentry support to device registry (#128157)
* Add config subentry support to device registry
* Apply suggestions from code review
* Update syrupy serializer
* Update snapshots
* Address review comments
* Allow a device to be connected to no or a single subentry of a config entry
* Update snapshots
* Revert "Allow a device to be connected to no or a single subentry of a config entry"
This reverts commit ec6f613151cb4a806b7961033c004b71b76510c2.
* Update test snapshots
* Bump release version in comments
* Rename config_subentries to config_entries_subentries
* Add config subentry support to entity registry (#128155)
* Add config subentry support to entity registry
* Update syrupy serializer
* Update snapshots
* Update snapshots
* Accept suggested changes
* Clean registries when removing subentry (#136671)
* Clean up registries when removing subentry
* Update tests
* Clean up subentries from deleted devices when removing config entry (#136669)
* Clean up subentries from deleted devices when removing config entry
* Move
* Add config subentry support to entity platform (#128161)
* Add config subentry support to entity platform
* Rename subentry_id to config_subentry_id
* Store subentry type in subentry (#136687)
* Add reconfigure support to config subentries (#133353)
* Add reconfigure support to config subentries
* Update test
* Minor adjustment
* Rename supported_subentry_flows to supported_subentry_types
* Address review comments
* Add subentry support to kitchen sink (#136755)
* Add subentry support to kitchen sink
* Add subentry reconfigure support to kitchen_sink
* Update kitchen_sink tests with subentry type stored in config entry
* Update kitchen_sink
* Update kitchen_sink
* Adjust kitchen sink tests
* Fix hassfest
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Improve docstrings and strings.json
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update snapshots
* Update snapshots
* Update snapshots
* Update snapshots
* Update snapshots
* Update snapshots
* Update snapshots
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Migrate from entry unique id to emoncms unique id
* Use a placeholder for the documentation URL
* Use async_set_unique_id in config_flow
* use _abort_if_unique_id_configured in config_flow
* Avoid single-use variable
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Add async_migrate_entry
* Remove commented code
* Downgrade version if user add server without uuid
* Improve code quality
* Move code migrating HA to emoncms uuid to init
* Fit doc url in less than 88 chars
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Improve code quality
* Only update unique_id with async_update_entry
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Make emoncms_client compulsory to get_feed_list
* Improve readability with unique id functions
* Rmv test to give more sense to _migrate_unique_id
---------
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Migrate emoncms to config flow
* tests coverage 98%
* use runtime_data
* Remove pyemoncms bump.
* Remove not needed yaml parameters add async_update_data to coordinator
* Reduce snapshot size
* Remove CONF_UNIT_OF_MEASUREMENT
* correct path in emoncms_client mock
* Remove init connexion check
as done by config_entry_first_refresh
since async_update_data catches exceptionand raise UpdateFailed
* Remove CONF_EXCLUDE_FEEDID from config flow
* Update homeassistant/components/emoncms/__init__.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Update homeassistant/components/emoncms/sensor.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Update homeassistant/components/emoncms/strings.json
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Use options in options flow and common strings
* Extend the ConfigEntry type
* Define the type explicitely
* Add data description in strings.json
* Update tests/components/emoncms/test_config_flow.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Update tests/components/emoncms/test_config_flow.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Add test import same yaml conf + corrections
* Add test user flow
* Use data_description...
* Use snapshot_platform in test_sensor
* Transfer all fixtures in conftest
* Add async_step_choose_feeds to ask flows to user
* Test abortion reason in test_flow_import_failure
* Add issue when value_template is i yaml conf
* make text more expressive in strings.json
* Add issue when no feed imported during migration.
* Update tests/components/emoncms/test_config_flow.py
* Update tests/components/emoncms/test_config_flow.py
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>