* Migrate sensors unique ids
1. migrate sensors to have unique id constructed also from entry_id
2. add migration flow in init
3. bump config flow to version 2
4. add tests for migration
* move migrate to async_setup_entry
* 1. Use the entity registry api in tests
2. Set up the config entry and not use integration directly
3. remove patch for entity registry
* fix too many lines
* Update tests/components/sabnzbd/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/sabnzbd/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/sabnzbd/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/sabnzbd/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add ws66i core integration
* Remove all ws66i translations
* Update ws66i unit tests to meet minimum code coverage
* Update ws66i based on @bdraco review
* General improvements after 2nd PR review
* Disable entities if amp shutoff, set default source names, set 30sec polling
* Add _attr_ and change async_on_unload
* Improve entity generation
* Implement coordinator
* Made options fields required, retry connection on failed attempts, use ZoneStatus for attributes
* Refactor WS66i entity properties, raise HomeAssistantError on restore service if no snapshot
* Update to pyws66i v1.1
* Add quality scale of silver to manifest
* Update config_flow test
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Ensure sql sensors keep working after using the options flow
Fixes
```
2022-05-06 16:17:57 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up sql platform for sensor
Traceback (most recent call last):
File "/Users/bdraco/home-assistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
await asyncio.shield(task)
File "/Users/bdraco/home-assistant/homeassistant/components/sql/sensor.py", line 97, in async_setup_entry
name: str = entry.options[CONF_NAME]
KeyError: name
```
* ensure saving the options flow fixes the broken config entry
* ensure options changes take effect right away
* Add cover to validate the reload