* Bump btsmarthub_devicelist
This PR bumps the btsmarthub_devicelist version to correct an issue
experienced by a recent firmware upgrade to the SmartHub2.
* Bump btsmarthub_devicelist to 0.2.3
This version bump fixes an issue where BT SmartHub2 devices cannot be
correctly autodetected. The current workaround is to specifiy it
manually, which isn't great UX (and did previously work until a recent
firmware upgrade).
I've also taken the opportunity to reassign ownership of the component
to myself as @jxwolstenholme no longer has a SmartHub so cannot do
manual testing and also has no need to use the component anymore.
* Refactor Shelly to use data class for ConfigEntry data
* Apply suggestions from code review
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Update homeassistant/components/shelly/__init__.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Optimize usage of shelly_entry_data in _async_setup_block_entry
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Fix bluetooth diagnostics on macos
The pyobjc objects cannot be pickled which cases dataclasses
asdict to raise an exception when trying to do the deepcopy
We now implement our own as_dict to avoid this problem
* add cover
* Use uuid as clientid/nickname
* Fixes after rebase
* Move gen_instance_ids() to utils
* Store client_id and nickname in config_entry
* Update tests
* Clean names
* Rename consts
* Set unique ID for fitbit sensors, including the user ID
* Remove fitbit_ from unique ids (see: https://developers.home-assistant.io/docs/entity_registry_index/#unique-id)
* change fitbit user_profile type to dict[str, Any]
* Fitbit: define a default unique ID, and add battery info if present
* No need for trailing _battery in unique ID, since it already contains "devices/battery_"
* Adding new calculation method
Adding calculation method Turkey.
islamic_prayer_times 0.0.6 already have turkey as a calc_method, bringing that into here.
* Update const.py
Updated with the feedback
* Importing PrayerTimesCalculator
* Update const.py
* improve device_automation trigger validation
Validates the trigger configuration against the device_trigger schema before trying to access any of the properties in order to provide better error messages.
Updates the error message to include an explicit indication that the error is coming from a trigger configuration. The inner error message from the validator can be accessed by viewing the stack trace.
Add test case for trigger missing domain.
Make action and condition validation consistent with trigger. This is not strictly necessary, but should be helpful for certain use cases that bypass some of the outer validation.
Removed redundant schema elements from humidifier device_trigger.
**Blueprint with missing `domain`**
```
2022-07-12 06:02:18.351 ERROR (MainThread) [homeassistant.setup] Error during setup of component automation
Traceback (most recent call last):
File "/workspaces/core/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/workspaces/core/homeassistant/components/automation/__init__.py", line 241, in async_setup
if not await _async_process_config(hass, config, component):
File "/workspaces/core/homeassistant/components/automation/__init__.py", line 648, in _async_process_config
await async_validate_config_item(hass, raw_config),
File "/workspaces/core/homeassistant/components/automation/config.py", line 74, in async_validate_config_item
config[CONF_TRIGGER] = await async_validate_trigger_config(
File "/workspaces/core/homeassistant/helpers/trigger.py", line 59, in async_validate_trigger_config
conf = await platform.async_validate_trigger_config(hass, conf)
File "/workspaces/core/homeassistant/components/device_automation/trigger.py", line 67, in async_validate_trigger_config
hass, config[CONF_DOMAIN], DeviceAutomationType.TRIGGER
KeyError: 'domain'
```
**Blueprint with missing `property` (specific to zwave_js event schema)**
```
2022-07-12 06:09:54.206 ERROR (MainThread) [homeassistant.components.automation] Blueprint Missing Property generated invalid automation with inputs OrderedDict([('control_switch', '498be56d796836a67406e9ad373d23db')]): required key not provided @ data['property']. Got None
```
**Blueprint with missing `domain`**
```
2022-07-12 06:12:16.080 ERROR (MainThread) [homeassistant.components.automation] Blueprint Missing Domain generated invalid automation with inputs OrderedDict([('control_switch', '498be56d796836a67406e9ad373d23db')]): invalid trigger configuration: required key not provided @ data['domain']. Got <homeassistant.components.blueprint.models.BlueprintInputs object at 0x7f581e097820>
```
**Blueprint with missing `property` (specific to zwave_js event schema)**
```
2022-07-12 06:12:16.680 ERROR (MainThread) [homeassistant.components.automation] Blueprint Missing Property generated invalid automation with inputs OrderedDict([('control_switch', '498be56d796836a67406e9ad373d23db')]): invalid trigger configuration: required key not provided @ data['property']. Got <homeassistant.components.blueprint.models.BlueprintInputs object at 0x7f581c0dc9d0>
```
* Revert humifidier TRIGGER_SCHEMA change.
* Also add 0 as a default for transition in const.py
This is the same default transition (none) that is used in ZHA's light.py
* Send default values for unconfigured options in ZHA's configuration API
* Remove options that match defaults values before saving