Commit Graph

267 Commits (21d96e00a244c26b4fa378e9117785566a4f07cb)

Author SHA1 Message Date
epenet 7796f361fc
Use precipitation_intensity class in integrations (#80615) 2022-10-26 13:32:06 +02:00
epenet 7838bb3ebe
Replace new PRECIPITATION_INTENSITY with enum (#80653) 2022-10-25 16:45:45 +02:00
epenet 62b0735822
Adjust precipitation units in components (#79783)
* Adjust precipitation units in components

* Don't update darksky
2022-10-19 15:09:05 +02:00
GitHub Action 388328adba [ci skip] Translation update 2022-10-17 00:36:39 +00:00
Erik Montnemery 43091a9856
Revert "Improve device_automation trigger validation" (#79778)
Revert "Improve device_automation trigger validation (#75044)"

This reverts commit 55b036ec5e.
2022-10-07 08:23:53 -04:00
Ben Randall 55b036ec5e
Improve device_automation trigger validation (#75044)
* 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.
2022-10-03 16:42:57 +02:00
epenet f9d36fe493
Use SensorDeviceClass.SPEED in rfxtrx (#79261)
Use SensorDeviceClass.VOLUME in rfxtrx
2022-09-29 09:20:13 +02:00
Erik Montnemery c38b1e7727
Improve check of new_entity_id in entity_registry.async_update_entity (#78276)
* 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
2022-09-28 08:43:58 +02:00
Marc Mueller 9c62c55f42
Fix rfxtrx typing (#79125) 2022-09-27 00:32:32 +02:00
Joakim Plate ace9592aa1
Enable strict typing for rfxtrx (#74927)
* Additional typing

* Enable strict typing

* Avoid changes causing coverage change

* Adjust comment on force update

* Rename to replace_devices

* Reduce typing scope

* Adjust mypy
2022-09-23 16:47:58 +02:00
GitHub Action 1f92804211 [ci skip] Translation update 2022-09-19 00:27:46 +00:00
epenet ff356205bf
Use platform constants from root (#78032) 2022-09-08 12:24:45 +02:00
epenet 6f564e4f51
Improve entity type hints [r] (#77874) 2022-09-06 09:47:35 +02:00
Marc Mueller 702f8180a6
Use TriggerActionType [l-t] (#76813) 2022-08-15 14:00:42 -04:00
GitHub Action bec8e544f4 [ci skip] Translation update 2022-08-14 00:25:47 +00:00
GitHub Action 6e03b12a93 [ci skip] Translation update 2022-08-13 00:25:00 +00:00
epenet 7d0a4ee00a
Improve type hints in rfxtrx siren entity (#76459) 2022-08-09 17:54:33 +02:00
GitHub Action 32a2999b85 [ci skip] Translation update 2022-08-06 00:24:46 +00:00
GitHub Action cb46441b74 [ci skip] Translation update 2022-08-05 00:28:51 +00:00
GitHub Action 81e3ef03f7 [ci skip] Translation update 2022-08-02 00:27:42 +00:00
epenet 7b1463e03d
Improve type hints in light [i-r] (#75943) 2022-07-31 13:53:22 +02:00
Joakim Plate 755abbe2d0
Make sure device tuple is a list on save (#75103) 2022-07-13 13:05:43 -07:00
GitHub Action a3fd5acf3f [ci skip] Translation update 2022-07-13 00:27:34 +00:00
Joakim Plate ee4749b207
Change more properties to attributes for rfxtrx (#74880)
* Move more properties to attributes

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Convert states to attributes

* Adjustments from review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2022-07-11 16:21:26 +02:00
J. Nick Koston cd03c49fc2
Wait for config entry platform forwards (#73806) 2022-07-09 17:27:42 +02:00
Joakim Plate 3a5cca3ff2
Convert rfxtrx to entity naming (#74720) 2022-07-09 17:15:08 +02:00
GitHub Action 235abb0c10 [ci skip] Translation update 2022-07-07 00:27:55 +00:00
Joakim Plate 11cdf542ac
Bump pyRFXtrx to 0.30.0 (#74146) 2022-06-30 14:48:50 -07:00
GitHub Action f5fe210eca [ci skip] Translation update 2022-06-29 00:23:03 +00:00
GitHub Action ba64d9db64 [ci skip] Translation update 2022-06-26 00:28:21 +00:00
epenet 6cafcb016f
Adjust rfxtrx cover type hints (#73947) 2022-06-24 10:22:40 +02:00
GitHub Action 33c263d09b [ci skip] Translation update 2022-06-23 00:20:13 +00:00
GitHub Action 4005af99aa [ci skip] Translation update 2022-06-14 00:26:59 +00:00
epenet dfc8dee2d6
Adjust device_automation type hints in rfxtrx (#72138) 2022-05-23 14:32:47 +02:00
GitHub Action ceb8bb4745 [ci skip] Translation update 2022-05-21 00:22:49 +00:00
GitHub Action 3a13ffcf13 [ci skip] Translation update 2022-05-19 00:26:11 +00:00
epenet 8b5803735f
Cleanup deprecated async_get_registry in rfxtrx (#72073) 2022-05-18 12:00:01 +02:00
Franck Nijhof c3d19f3827
Clean up accessing device_registry helpers via hass (#72031) 2022-05-17 12:22:15 -07:00
Franck Nijhof c8f700c803
Clean up accessing dispatcher helpers via hass (#72014)
Clean up accessing ditpatcher helpers via hass
2022-05-17 18:41:36 +02:00
GitHub Action 37f81b261d [ci skip] Translation update 2022-05-16 00:24:28 +00:00
AlainH 656e88faec
Update pyRFXtrx dependency to 0.29.0 (#71852)
* rfxtrx: update pyRFXtrx dependency to 0.29.0

* Update requirements_all.txt / requirements_test_all.txt
2022-05-14 18:10:15 +02:00
GitHub Action c7e8428daa [ci skip] Translation update 2022-05-13 00:26:47 +00:00
epenet 2ea583536b
Use ColorMode enum in rfxtrx (#70530) 2022-04-23 09:42:14 -10:00
epenet af57f9c6a4
Use SirenEntityFeature enum in components (#69645) 2022-04-08 09:13:12 +02:00
epenet b8fc399882
Use EntityFeature enum in components (r**) (#69437) 2022-04-07 14:55:09 +02:00
epenet 766e6f2e9c
Migrate rfxtrx light to color_mode (#69530) 2022-04-07 09:09:47 +02:00
Franck Nijhof 15cffbe496
Clean up async_dispatcher_connect helper usage (#68613) 2022-03-24 13:19:11 +01:00
GitHub Action c64b4d997b [ci skip] Translation update 2022-03-13 00:18:58 +00:00
Joakim Plate 09a85d2a5d
Add basic rfxtrx diagnostics (#67671)
* Add basic rfxtrx diagnostics

* Skip diagnostics for coverage
2022-03-11 20:27:08 -08:00
GitHub Action dc31f420ed [ci skip] Translation update 2022-03-12 00:17:47 +00:00