* Only reload modified automations
* Update tests
* Adjust spelling
* Improve efficiency of matching automations and configurations
* Reload automations without an alias if they have been moved
* Add test
* Add test
* Add test
* try serializing cluster command schemas
* use min and max value from zigpy type
* different type assignments
* initial command execution changes
* cleanup
* cleanup and typing
* typing
* typing
* add tests
* mypy
* handle raw values too
* check for None responses
* make backwards compatible
* update yaml for svc change
* Bump Wallbox package
* remove debug message
* Force update of auth token by emptying it first
* Force token refresh by emptying token
Improve exception handling
* include tests
* Update __init__.py
* Removed the clearing ot jwt token, issue is fixed by upstream fix in wallbox package.
* Catch connectionerror
* Update homeassistant/components/wallbox/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Run black
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Cleanup unused option in google travel time
* Adjust tests
* Adjust to use local constant
* Tweak logic
* Reduce size of PR
* Add tests
* Use system compare
* Use is not ==
* Adjust to use local constant again
* merge upstream/dev
* remove comment
* coverage increase
* merge upstream/dev
* refactor
* wait for another PR
* remove left overs
* wait for next PR
* only remove on successful unload
Co-authored-by: Shay Levy <levyshay1@gmail.com>
Co-authored-by: Shay Levy <levyshay1@gmail.com>
* Add reauth flow
* Cover cases without existing password
* Add test to verify upgrading from older versions
* Connect to the device first
* Use Mapping for async_step_reauth
* Set empty password for user step and remove unneeded update of unique_id
* Do not write old state sharing availability topic
* Add a test
* Support for all availability topics
* delay async_write_ha_state till last callback
* Process write req after processing callback jobs
* Do not count subscription callbacks
* Simplify
* Stale docsting
* No topic needed for delays state write
* No need to clear when reloading
* Move test to test_mixins.py
* Only set up sensor platform for test
* Update Config Flow to show cozytouch unsupported hardware error
* Apply feedback
* Remove vague unknown user exception
* Fix test
* Code coverage back to 100%
* Add visual preview during setup of generic camera
* Code review: standardize preview url
* Fix slug test
* Refactor to use HomeAssistantView
* Code review: simplify
* Update manifest
* Don't illegally access protected member
* Increase test coverage
* Prevent browser caching of preview images.
* Code review:move incrementor to ?t=X + simplify
* Discard old flow preview data
* Increase test coverage
* Code review: rename variables for clarity
* Add timeout for image previews
* Fix preview timeout tests
* Simplify: store cam image preview in config_flow
* Call step method to transition between flow steps
* Only store user_input in flow, not CameraObject
* Fix problem where test wouldn't run in isolation.
* Simplify test
* Don't move directly to another step's form
* Remove unused constant
* Simplify test
Co-authored-by: Dave T <davet2001@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
* 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.
* Update sensor.py
* Change "EV Time to Fully Charged" type to datetime object (HA 2022.2)
* Validate types before accessing dict entries
* Test handling of invalid data from Subaru
* Bump to subarulink 0.4.2
* Incorporate style suggestion
* Update sensor.py to use SensorEntity
* isort tests
* Remove SubaruSensor.current_value
* Fix isort errors
* Resolve conflict from previous PR (add locks)
* Fix linting errors in config_flow.py
* Incorporate PR review comments for sensor
* Incorporate PR review comments for sensor
* Make 3rd party library responsible for API data parsing
* Add type annotations to sensor.py
* Incorporate PR review comments
* Incorporate PR review comments
* Set _attr_has_entity_name = True for sensors
* NEST - Issues with lost internet connectivity #70479
Update Climate and Sensor entities to be unavailable when the device connectivity trait indicates the device is offline.
The prior behavior, the last known values would be displayed indefinitely if the device lost internet connectivity. This was creating the illusion that the device was still connected. With this change, the Home Assistant entities will become unavailable when the device loses connectivity.
* Update formatting
* Add doc strings, fix indentation
* Fix doc strings
* Update test_climate_sdm.py
* Update test_climate_sdm.py
* Update test_sensor_sdm.py
* Update test_sensor_sdm.py
* more formatting fixes
* Place availability logic in mixin
1. Consolidate repeated code into mixin and apply mixin to Climate and Sensor entities
2. Return true instead of super.available()
3. No unit test changes required to maintain code coverage
* Define self._device is mixin to make linter happier
* Remove logger used for debugging
* restore whitespace
* Fix test due to underlying merge change
* Update availability_mixin.py
* Move availability logic into device_info
* Update sensor_sdm.py
* Add Config Flow to APCUPSd integration and remove YAML support.
* Hide the binary sensor if user does not select STATFLAG resource.
* Add tests for config flows.
* Simplify config flow code.
* Spell fix.
* Fix pylint warnings.
* Simplify the code for config flow.
* First attempt to implement import flows to suppport legacy YAML configurations.
* Remove unnecessary log calls.
* Wrap synchronous update call with `hass.async_add_executor_job`.
* Import the YAML configurations when sensor platform is set up.
* Move the logger call since the variables are not properly set up.
* Add codeowner.
* Fix name field of manifest.json.
* Fix linting issue.
* Fix incorrect dependency due to incorrect rebase.
* Update codeowner and config flows via hassfest.
* Postpone the deprecation warning to 2022.7.
* Import future annotations for init file.
* Add an newline at the end to make prettier happy.
* Update github id.
* Add type hints for return types of steps in config flow.
* Move the deprecation date for YAML config to 2022.12.
* Update according to reviews.
* Use async_forward_entry_setups.
* Add helper properties to `APCUPSdData` class.
* Add device_info for binary sensor.
* Simplify config flow.
* Remove options flow strings.
* update the tests according to the changes.
* Add `entity_registry_enabled_default` to entities and use imported CONF_RESOURCES to disable entities instead of skipping them.
* Update according to reviews.
* Do not use model of the UPS as the title for the integration.
Instead, simply use "APCUPSd" as the integration title and let the device info serve as title for each device instead.
* Change schema to be a global variable.
* Add more comments.
* Rewrite the tests for config flows.
* Fix enabled_by_default.
* Show friendly titles in the integration.
* Add import check in `async_setup_platform` to avoid importing in sensor platform setup.
* Add import check in `async_setup_platform` to avoid importing in sensor platform setup.
* Update comments in test files.
* Use parametrize instead of manually iterating different test cases.
* Swap the order of the platform constants.
* Avoid using broad exceptions.
* Set up device info via `_attr_device_info`.
* Remove unrelated test in `test_config_flow`.
* Use `DeviceInfo` instead of dict to assign to `_attr_device_info`.
* Add english translation.
* Add `async_create_issue` for deprecated YAML configuration.
* Enable UPS status by default since it could show "online, charging, on battery etc" which is meaningful for all users.
* Apply suggestions from code review
* Apply suggestion
* Apply suggestion
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Improve check of new_entity_id in entity_registry.async_update_entity
* Fix race in rfxtrx config flow
* Make sure Event is created on time
* Rename poorly named variable
* Fix typing
* Correct typing of _handle_state_change
* Fix EZVIZ spelling case
The vendor seems consistent about all-uppercase spelling, so let's
follow suit.
* Revert changes to translations other than English
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Add MQTT debug_info to dataclass
* Remove total attr, assign factory
* Rename typed dict to MqttDebugInfo and use helper
* Split entity and trigger debug info
* Refactor
* More rework
* Add nibe local integration
* Add sensor platform
* Enable sensor platform
* Fix manifest
* Correct domain after rename
* Adjust tests for rename
* Correct codeowners
* Add requirements for tests
* Grab coil by name
* Switch to home assistant error
* Config entry always exist
* Switch to create task
* Bump to 0.5.0
* Use new coils access
* Remove unneeded check
* Use single instance of logger
* Test invalid ip
* Don't allow coil to be None
* Remove sleep
* Initialize data in coordinator init
* Add utils to ignore
* Update homeassistant/components/nibe_heatpump/manifest.json
Co-authored-by: J. Nick Koston <nick@koston.org>
* Use generator instead
* Use tenacity as retry decorator
* Use package instead of name to get logger
* Skip broad exception handling
* Catch missing coil exception
* Add missing test
Co-authored-by: J. Nick Koston <nick@koston.org>
* Prompt user to remove application credentials when deleting config entries
* Adjust assertions on intermediate state in config entry tests
* Add a callback hook to modify config entry remove result
* Improve test coverage and simplify implementation
* Register remove callback per domain
* Update homeassistant/components/application_credentials/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Fix tests to use new variable name including domain
* Add websocket command to return application credentials for an integration
* Remove unnecessary diff
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* deconz - add current hvac operation to thermostate based on "state"
* deconz - extend current hvac operation to thermostate based on "state" and "mode"
* Add tests for current hvac action
* Add boost mode as special case
* format using Black
* sort imports
* Add test for device with mode none and state none
* Update homeassistant/components/deconz/climate.py
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
* Fix test_climate.py test_no_mode_no_state
* Add test for boost mode
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>