Commit Graph

280 Commits (127eca3c35f07fa9732cf5525092d1491a44393f)

Author SHA1 Message Date
GitHub Action 1e0345a377 [ci skip] Translation update 2022-12-10 00:21:35 +00:00
GitHub Action f25017313a [ci skip] Translation update 2022-12-09 00:24:29 +00:00
GitHub Action 1f3e5fb4fc [ci skip] Translation update 2022-12-07 00:24:08 +00:00
epenet d915fd3052
Use new device class in rfxtrx (#83368) 2022-12-06 10:09:03 +01:00
GitHub Action 3ab9a14ce7 [ci skip] Translation update 2022-12-06 00:21:31 +00:00
GitHub Action 5f9290e572 [ci skip] Translation update 2022-12-05 00:23:07 +00:00
GitHub Action 0d1f476bee [ci skip] Translation update 2022-12-01 00:33:36 +00:00
GitHub Action 197e71203b [ci skip] Translation update 2022-11-30 00:26:16 +00:00
GitHub Action 230b50d099 [ci skip] Translation update 2022-11-29 00:26:01 +00:00
GitHub Action f3b3193f7a [ci skip] Translation update 2022-11-25 00:24:19 +00:00
GitHub Action eaf6d43508 [ci skip] Translation update 2022-11-23 00:26:26 +00:00
GitHub Action 0be2a3f182 [ci skip] Translation update 2022-11-22 00:26:32 +00:00
GitHub Action fe5246fb6f [ci skip] Translation update 2022-11-19 00:26:11 +00:00
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