Commit Graph

13695 Commits

Author SHA1 Message Date
spycle e2b7e79ccb
Fix keymitt_ble discovery (#79809)
* Fix keymitt_ble discovery

* Update tests

* Up version

* Up version keymitt_ble

* Up version keymitt_ble
2022-10-08 08:19:40 +02:00
Maciej Bieniek 5abff31437
Use new device classes in Accuweather integration (#79717)
* Add new device classes

* Update tests
2022-10-07 17:52:36 -06:00
Robert Hillis 87a22fbcca
Move Sonarr API calls to coordinators (#79826) 2022-10-08 00:25:16 +02:00
Franck Nijhof 0b9d029350
Add switch platform to LaMetric (#79759)
* Add switch platform to LaMetric

* Little naming tweak
2022-10-07 15:03:58 +02: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
Ville Skyttä 9b44cf0127
Add Huawei LTE reauth flow (#78005)
* Add Huawei LTE reauth flow

* Upgrade huawei-lte-api to 1.6.3, use LoginErrorInvalidCredentialsException
2022-10-07 12:24:09 +02:00
Jan Bouwhuis aee82e2b3b
De-duplicate MQTT config_flow code (#79369)
* De-duplicate config_flow code

* De duplicate code birth and will
2022-10-07 10:12:19 +02:00
taiyeoguns 9a81b65815
Convert kira tests to pytest (#79747) 2022-10-07 08:21:18 +02:00
Franck Nijhof 90d39a414c
Add LaMetric number tests (#79748) 2022-10-07 08:11:10 +02:00
Franck Nijhof 633ffad443
Add diagnostics to LaMetric (#79757)
* Add diagnostics to LaMetric

* Add return value typing

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-10-07 08:07:59 +02:00
Dave T 6040c30b45
Add visual image preview during generic camera config flow (#71269)
* 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>
2022-10-06 22:24:19 +02:00
Erik Montnemery 51e6d49451
Adapt homekit to color temperatures in K (#79713) 2022-10-06 09:20:10 -10:00
Erik Montnemery aa5575ba65
Only validate sensors in sensor.recorder.validate_statistics (#79749) 2022-10-06 21:17:46 +02:00
puddly 2dab9073fe
ZHA radio migration: reset the old adapter (#79663) 2022-10-06 14:02:24 -04:00
Erik Montnemery 0a59d37e62
Correct how unit used for statistics is determined (#79725) 2022-10-06 14:01:54 -04:00
epenet aa0bb9c3d2
Improve precision in pressure conversion (#79362)
* Improve precision in pressure conversion

* Use _STANDARD_GRAVITY

* Add again pytest.approx
2022-10-06 12:48:31 +02:00
Erik Montnemery 47d0598e75
Use Kelvin as the preferred color temperature unit (#79591)
* Use Kelvin as the preferred white temperature unit

* Update homekit

* Adjust tests
2022-10-06 12:22:39 +02:00
Shay Levy ce6ccffd9c
Fix Switcher breeze fan mode and swing control (#79676) 2022-10-06 08:10:04 +03:00
J. Nick Koston c798723c27
Fix bluetooth diagnostics on macos (#79680)
* 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
2022-10-06 04:32:29 +02:00
Erik Montnemery 5d7756885b
Normalize to kWh when handling WS energy/fossil_energy_consumption (#79649)
* Normalize to kWh when handling WS energy/fossil_energy_consumption

* Improve test
2022-10-05 16:27:08 +02:00
Erik Montnemery 59d9d3de69
Add at_started helper (#79577) 2022-10-05 12:24:51 +02:00
Shay Levy 723b018b63
Refactor Shelly tests - do not access hass.data (#79606) 2022-10-05 11:36:06 +02:00
Maciej Bieniek 9dd9147343
Use HA `uuid` as `client_id` in BraviaTV (#79618)
* 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
2022-10-05 11:24:52 +03:00
Erik Montnemery 18033532ca
Fix search throwing on templated services (#79637) 2022-10-05 10:59:18 +03:00
Mike Degatano 416c10a793
Supervisor update entity auto update from api (#79611)
* Supervisor update entity auto update from api

* Update api mocks in tests
2022-10-05 08:27:56 +02:00
Mike Degatano 051374d73e
Handle state is None in InfluxDB (#79609) 2022-10-04 21:43:57 +03:00
Raman Gupta 27413cee19
Bump zwave_js lib to 0.43.0 and fix multi-file firmware updates (#79342) 2022-10-04 10:40:49 -04:00
kpine c040a7a152
Set zwave_js climate entity target temp attributes based on current mode (#79575)
* Report temperature correctly

* DRY

* Add test assertions

* Don't catch TypeError (revert)
2022-10-04 11:54:13 +02:00
Erik Montnemery e93deaa8aa
Simplify long term statistics by always supporting unit conversion (#79557) 2022-10-03 21:50:05 -04:00
J. Nick Koston 2768b2445a
Remove call to deprecated bleak register_detection_callback (#79558) 2022-10-03 21:15:09 -04:00
Allen Porter 90637a721c
Add option to set a stun server for RTSPtoWebRTC (#72574) 2022-10-03 21:10:28 -04:00
Erik Montnemery a2e3978d53
Don't normalize units of long term statistics (#79320)
* Don't normalize units of long term statistics

* Update statistics.py
2022-10-03 21:42:44 +02:00
Raman Gupta 9b7eb6b5a1
Reduce coverage gaps for zwave_js (#79520)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-10-03 20:24:11 +02:00
Petro31 f3007b22c4
Allow setting set_percentage and set_preset_mode of template fan without turning on (#75656)
* decouple set_percentage and set_preset_mode from entity state

* correct set_percent self._state logic

* Add tests

* remove _VALUD_STATES

* decouple percent and preset_mode
2022-10-03 20:22:05 +02:00
Guido Schmitz 3e3f7ea995
Rework devolo Home Network tests (#74472) 2022-10-03 18:21:45 +02: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 825f9502ad
Align temperature conversion with other converters (#79521)
* Align temperature conversion with other converters

* Add comments and docstring

* Align tests
2022-10-03 10:09:55 +02:00
ehendrix23 47b40e1e61
Add optional default value to average template function/filter (#77499)
* Return None on empty list

* Updated to use default value

* Update comment.
2022-10-03 10:07:19 +02:00
Maciej Bieniek 3b794038b1
Add reauth flow to BraviaTV integration (#79405)
* Raise ConfigEntryAuthFailed

* Add reauth flow

* Add tests

* Patch pair() method to avoid IO

* Remove unused errors dict
2022-10-02 13:07:57 -07:00
Ryan Fleming 2ea9732419
Support reauth for octoprint (#77213)
* Add reauth flow to octoprint

* Add unit tests around octoprint reauth

* Add missing strings

* Fix unit test mocks
2022-10-02 08:08:45 +02:00
Maximilian 7ae942a62b
Fix nina warning state (#76354)
* Fix warning state

* Improve data handling

* Remove duplicate code
2022-10-01 21:22:18 -07:00
Avi Miller 205ce2bac5
Refactor LIFX multizone devices to use extended messages (#79444) 2022-10-01 18:21:48 -10:00
Jevgeni Kiski f95b8ccc20
Improve vallox tests and code quality (#75787)
code quality improvements
2022-10-01 21:13:15 -07:00
Rami Mosleh 38a680c3eb
Add reauthenticaion to `mikrotik` (#74454) 2022-10-01 20:37:24 -07:00
Allen Porter 7b8b73f826
Update nest climate to avoid duplicate set mode commands (#79445) 2022-10-01 21:59:10 -04:00
Tobias Sauerwein 3e411935bb
Fix Netatmo scope issue with HA cloud (#79437)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-10-01 21:11:54 -04:00
Allen Porter d03553bbf0
Address Google Sheets PR feedback (#78889) 2022-10-01 20:42:11 -04:00
J. Nick Koston 5055d3ff4b
Enable delete device support for iBeacon (#79339) 2022-10-01 14:17:45 -10:00
Steven Looman 083db97476
Sort motioneye media items in media browser (#79408)
* Sort media

* KEY_MEDIA_SORT_ATTR should be in const

* Changes after review
2022-10-02 00:36:03 +02:00
Garrett 9058b5b9c3
Update sensors for Subaru integration (#66996)
* 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
2022-10-02 00:25:49 +02:00