Commit Graph

316 Commits

Author SHA1 Message Date
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
GitHub Action c374435282 [ci skip] Translation update 2022-03-08 00:18:11 +00:00
Joakim Plate e8c05298ba
Remove rfxtrx signal repetition (#67675) 2022-03-06 10:29:20 +01:00
GitHub Action acd906dfab [ci skip] Translation update 2022-03-05 00:19:17 +00:00
Joakim Plate 13eeaa4c73
rfxtrx: bump to 0.28 (#67530) 2022-03-03 11:29:58 +01:00
Joakim Plate 3c3a27584a
Rfxtrx correct overzealous type checking (#67437) 2022-03-02 10:36:23 +01:00
GitHub Action e963ad96d4 [ci skip] Translation update 2022-03-01 00:23:47 +00:00
GitHub Action 1b97f48c1f [ci skip] Translation update 2022-02-28 00:19:57 +00:00
GitHub Action 479aa13211 [ci skip] Translation update 2022-02-27 00:19:29 +00:00
Joakim Plate a151d3f9a0
Don't trigger device removal for non rfxtrx devices (#67315) 2022-02-27 00:14:12 +01:00
Joakim Plate 01fa6e7513
Eliminate extra include (#67316) 2022-02-27 00:13:48 +01:00
GitHub Action 0f418341f3 [ci skip] Translation update 2022-02-26 00:17:09 +00:00
James Hewitt 069e70ff03
Add mode setting to RFXtrx device configuration (#67173)
This allows users to configure the modes on their RFXtrx device without
downloading additional software that only runs on Windows. It also
enables the use of modes that cannot be permanently enabled on the
device, such as for undecoded and raw messages.
2022-02-25 20:43:29 +01:00
Joakim Plate 8a74295d6f
Add support for rfxtrx sirens and chimes (#66416)
* Add support for sirens and chimes

* Fixup testing

* Fixup comments

* Hook up existing off delay

* Add docs for off delay.

* Rename mixin
2022-02-25 07:53:22 +01:00
Joakim Plate 9906717e33
Use opt in device removal for rfxtrx (#58252) 2022-02-23 20:17:48 +01:00
GitHub Action 102ae9f0e3 [ci skip] Translation update 2022-02-22 00:17:23 +00:00
GitHub Action c4cc6ca0ba [ci skip] Translation update 2022-02-20 00:20:09 +00:00
Niels AD ccdf182d31
rfxtrx: Add command_on/command_off support for pt2262 switch entities (#65798) 2022-02-06 19:39:57 +01:00
GitHub Action 2da4d280b2 [ci skip] Translation update 2022-02-06 00:17:31 +00:00
GitHub Action ca7d4234e1 [ci skip] Translation update 2022-01-31 00:14:28 +00:00
GitHub Action 77ef86faee [ci skip] Translation update 2022-01-30 00:14:21 +00:00
J. Nick Koston 5b755b74fb
Add loggers to integration manifest.json (#65083) 2022-01-28 13:37:53 -08:00
Joakim Plate 2e2e589ac3
rfxtrx: bump to 0.27.1 (#64666) 2022-01-22 11:30:16 +02:00
epenet 250379e181
Add setup type hints (init) (#64351)
* Add setup type hints to acmeda

* Add setup type hints to xiaomi_aqara

* Add setup type hints to motion_blinds

* Add setup type hints to xiaomi_miio

* Add setup type hints to diagnostics

* Add setup type hints to zha

* Add setup type hints to firmata

* Add setup type hints to denonavr

* Add setup type hints to rfxtrx

* Add setup type hints to hue

* Cleanup denonavr

* Add return types to xiaomi_miio

* Fix return type

Co-authored-by: epenet <epenet@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-01-19 18:00:34 +01:00
epenet 91c47264b5
Add setup type hints to rfxtrx (#63963)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-13 07:00:14 +01:00
epenet a19c95e4bd
Ensure service calls are typed [o-r] (#62920)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-28 13:10:17 +01:00
Joakim Plate bda1f02371
Reduce boilerplate code in entry init of rfxtrx (#58844)
* Reduce boilerplate code for rfxtrx

* Use rfxtrx built in to construct event

* Fixup mypy after rebase

* Also fix callable import
2021-12-22 22:38:55 +01:00
GitHub Action cceedf766a [ci skip] Translation update 2021-12-22 00:14:51 +00:00
GitHub Action babd753610 [ci skip] Translation update 2021-12-21 00:15:06 +00:00
GitHub Action d4f8a7c056 [ci skip] Translation update 2021-12-17 00:14:01 +00:00
Robert Hillis d5fe0fcee0
Use enums in rfxtrx (#62039) 2021-12-16 14:34:10 +01:00
Michael 83989d7b40
Use relative imports [L-R] (#61575) 2021-12-13 00:24:46 +01:00
GitHub Action f75b325ab2 [ci skip] Translation update 2021-12-12 00:14:30 +00:00
Joakim Plate ea3e08c041
Improve type checking for rfxtrx (#58837) 2021-12-09 13:35:53 -08:00
bigbadblunt 497f036af6
Add default value for signal_repetitions in cover (#61393) 2021-12-09 22:12:40 +01:00
Daniel Hjelseth Høyer 07d0b6f726
Use new EntityCategory in rfxtrx (#61295) 2021-12-08 22:08:05 +01:00
Marc Mueller 79cd281c48
Use platform enum (5) [P-R] (#60943) 2021-12-04 13:19:49 +01:00
GitHub Action 68ca0a05c8 [ci skip] Translation update 2021-12-04 00:13:16 +00:00
Daniel Hjelseth Høyer d60517d5f4
Use state and device class enum in Rfxtrx (#60773) 2021-12-01 18:06:13 +01:00
GitHub Action c9589f763c [ci skip] Translation update 2021-12-01 00:17:12 +00:00
GitHub Action a925451906 [ci skip] Translation update 2021-11-30 00:13:53 +00:00
GitHub Action 3af54d96c7 [ci skip] Translation update 2021-11-28 00:14:19 +00:00
GitHub Action 96313bbbe0 [ci skip] Translation update 2021-11-27 00:12:17 +00:00
GitHub Action d3c020325b [ci skip] Translation update 2021-11-25 00:13:33 +00:00
GitHub Action 29dc9de08f [ci skip] Translation update 2021-11-19 00:14:01 +00:00
Joakim Plate f0b3fbc5a7
Always fire event for known devices in rfxtrx (#58845) 2021-11-16 19:03:18 +01:00
GitHub Action 3f2b1fa952 [ci skip] Translation update 2021-11-12 00:12:35 +00:00
GitHub Action e35b83081e [ci skip] Translation update 2021-11-08 00:12:31 +00:00
GitHub Action 332a571bb4 [ci skip] Translation update 2021-11-07 00:12:38 +00:00
Marvin Wichmann c5b5c8c3ce
Remove deprecated usages of HomeAssistantType (#59241) 2021-11-06 19:48:02 +01:00
GitHub Action 7b59dea67e [ci skip] Translation update 2021-11-06 00:11:41 +00:00
Marc Mueller b6d9e517c2
Use assignment expressions 37 (#58827) 2021-10-31 18:45:27 +01:00