* Changed where the script events are collected to remove any device communication from async_setup_entry
* Implemented improvements and added a test to test whats happends when script_getcode fails
* Renamed script_events to rpc_script_event to make clear this is only for RPC devices
Co-authored-by: Shay Levy <levyshay1@gmail.com>
---------
Co-authored-by: Shay Levy <levyshay1@gmail.com>
* Initial commit
* Refactor
* Call async_add_entities() once
* Type
* Cleaning
* `supported` is not needed here
* Add error handling
* Add test
* Fix name
* Change class name
* Change method name
* Move BLU_TRV_TIMEOUT
* Fix BLU_TRV_TIMEOUT import
* Coverage
* Use test snapshots
* Support error translations
* Fix tests
* Introduce ShellyBaseButton class
* Rename press_method to _press_method
* Improve exception strings
raise_on_progress=False was missing in the user flow which
made it impossible to configure a shelly by IP when there
was an active discovery because the flow would abort
* 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>
* When an event is received from a script component on a shelly device, this event is send to the hass event bus
* Event emitted from a script will be send to the corresponding event entity
* Added tests for the shelly script event
* The event entity for script are now hidden by default
* Forgot to enable script event entities by default for the test
* Made serveral improvement for the shelly script event entity
- Added device name to event entity
- The event entity is now only created when a script has any event types
- The test for this entity now uses snapshots
* Shelly script event entities will not be create for the BLE scanning script and will now be automatically removed when the script no longer exsists
* Changed variable name to avoid confusion with _id
* Removed old const from first implementation and removed _script_event_listeners and used _event_listeners instead to listen for script events
* Add bluetooth API to remove scanners that are no longer used
- Cleanup the advertisment history right away when a scanner is removed
In the future we will do some additional cleanup
* coverage
* finish tests
* Ensure Shelly cleanups Bluetooth scanner data upon removal
needs https://github.com/home-assistant/core/pull/135408
* Index config entry discovery_keys by discovery domain
* Add new signal
* Update tests
* Update homeassistant/config_entries.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Fix imports
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Reinitialize zeroconf discovery flow on unignore
* Adjust tests
* Improve comments
* Fix logic for updating discovery keys
* Add tests
* Use mock_config_flow helper in new config_entries test
* Add discovery_keys attribute to ConfigEntry
* Update zeroconf rediscovery
* Change type of ConfigEntry.discovery_keys
* Update tests
* Fix DiscoveryKey.from_json_dict and add tests
* Fix test
---------
Co-authored-by: J. Nick Koston <nick@koston.org>