Commit Graph

15096 Commits (5a9815570002c7383534dee2e3421d970db64042)

Author SHA1 Message Date
J. Nick Koston 65a5244d5a
Fix race and add test coverage for esphome select platform (#95019) 2023-06-22 01:19:47 +02:00
Jan Bouwhuis 31f845bfe0
Add current_humidity attribute to mqtt humidifier (#94955) 2023-06-21 19:19:26 +02:00
Barry Williams 57c9aad9b1
Migrate Linn / Openhome integration to SSDP config flow (#94564)
* Migrate Linn / Openhome integration to SSDP config flow

* moved device initialisation into __init__

* wait for user step before adding openhome entities

* add CONFIG_SCHEMA

* cover confirmation step in config flow test

* Address comments

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-21 12:46:17 -04:00
Erik Montnemery c8cd469c95
Teach media_player device trigger about entity registry ids (#94979) 2023-06-21 16:09:28 +02:00
Martin Hjelmare f9366e5cc7
Migrate google translate to config entries (#93803)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-21 14:58:58 +02:00
Erik Montnemery 22e1feb223
Teach humidifier device trigger about entity registry ids (#94974) 2023-06-21 14:58:11 +02:00
Erik Montnemery af97857c87
Teach select device trigger about entity registry ids (#94981) 2023-06-21 14:51:39 +02:00
Erik Montnemery 7f0be78ebb
Teach netatmo device trigger about entity registry ids (#94980) 2023-06-21 14:51:24 +02:00
Erik Montnemery e404441e8c
Teach lock device trigger about entity registry ids (#94975) 2023-06-21 14:51:09 +02:00
Erik Montnemery 20be441c9f
Teach device_tracker device trigger about entity registry ids (#94972) 2023-06-21 14:51:00 +02:00
Erik Montnemery 49c7d2ff89
Teach cover device trigger about entity registry ids (#94971) 2023-06-21 14:50:40 +02:00
Erik Montnemery f3defff429
Teach climate device trigger about entity registry ids (#94969) 2023-06-21 14:50:21 +02:00
Erik Montnemery 49ec806046
Teach button device trigger about entity registry ids (#94965)
* Teach button device trigger about entity registry ids

* Update homekit_controller tests
2023-06-21 14:50:11 +02:00
Erik Montnemery 4414f06ed2
Teach binary_sensor device trigger about entity registry ids (#94963)
* Teach binary_sensor device trigger about entity registry ids

* Update deconz test
2023-06-21 14:49:53 +02:00
Maciej Bieniek 05039036f1
Add compatibility with sleeping Shelly gen2 devices with firmware 1.0.0 (#94864) 2023-06-21 12:01:17 +02:00
RoboMagus 3bacd9df2f
Add trigger for persistent_notification (#94809)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-21 11:55:06 +02:00
J. Nick Koston 605c4db142
Relocate async_get_announce_addresses from zeroconf to network (#94816) 2023-06-21 11:29:04 +02:00
Erik Montnemery b254218dd6
Remove `base_url` configuration option from `tts` (#94905) 2023-06-21 11:20:33 +02:00
Joost Lekkerkerker 83c478105b
Add entity translations for huisbaasje (#94116) 2023-06-21 11:18:55 +02:00
epenet 60b78f4648
Add error handling to hassio issues (#94951) 2023-06-21 11:17:11 +02:00
Erik Montnemery 1d18fdf7bd
Improve alarm_control_panel device trigger tests (#94956) 2023-06-21 11:11:07 +02:00
Guido Schmitz 933ae5198e
Refactor devolo_home_network tests (#88706)
* Refactor devolo_home_network tests

* Reduce to snapshot introduction

* Simplify

* Update snapshots

* Simplify further
2023-06-21 10:21:36 +02:00
Erik Montnemery 446a820cbb
Name unnamed sensors by their device class (#94646) 2023-06-20 23:09:24 +02:00
J. Nick Koston b857dc8d94
Bump HAP-python to 4.7.0 (#94812) 2023-06-20 23:06:26 +02:00
Jan Bouwhuis 4def901ecc
Ignore empty status update for mqtt number (#94800) 2023-06-20 23:04:01 +02:00
Jan Bouwhuis a4399a4cb6
Add device trigger for humidifier current_humidity (#94926) 2023-06-20 22:57:44 +02:00
Jan Bouwhuis 3b8feab699
Add current_humidity to humidifiers in google_assistant (#94935) 2023-06-20 22:49:10 +02:00
Jan Bouwhuis d6b89b6f7b
Add current_humidity attribute on homekit_controller humidifier (#94937) 2023-06-20 21:46:07 +01:00
Austin Mroczek 252c0e8ad9
Fix Totalconnect BinarySensorDeviceClass logic (#94772)
* handle temperature

* test for temperature

* test for unknown
2023-06-20 22:12:11 +02:00
Erik Montnemery 6183a36fce
Replace assert_lists_same with pytest_unordered in integrations t-z (#94903) 2023-06-20 20:23:49 +02:00
Erik Montnemery eba04824a4
Replace assert_lists_same with pytest_unordered in integrations n-s (#94902) 2023-06-20 20:23:14 +02:00
Erik Montnemery 6a29ed8caa
Replace assert_lists_same with pytest_unordered in integrations a-f (#94900) 2023-06-20 20:22:31 +02:00
Erik Montnemery fd822bce56
Replace assert_lists_same with pytest_unordered in integrations h-m (#94901) 2023-06-20 20:16:25 +02:00
Denis Shulyaka 1d2a973289
Generic hygrostat current humidity (#94912) 2023-06-20 20:10:21 +02:00
Erik Montnemery b600c2cd85
Add cloud_connected method to CloudClient (#91997)
* Add cloud_connected method to CloudClient

* Add cloud_disconnected method

* Update client.py
2023-06-20 17:15:13 +02:00
J. Nick Koston 3f18f515e7
Improve websocket api coverage and typing (#94891) 2023-06-20 15:21:24 +01:00
Erik Montnemery 4a8adae146
Teach alarm_control_panel device trigger about entity registry ids (#60977)
* Teach alarm_control_panel device trigger about entity registry ids

* Lint code

* Address review comment
2023-06-20 08:27:31 -04:00
Denis Shulyaka 185aaa9e07
Humidifier current humidity (#94874) 2023-06-20 09:43:33 +02:00
J. Nick Koston 1206f2c1da
Fix memory leaks in websocket api (#94780)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-19 18:27:22 -05:00
Erik Montnemery a7d327afa2
Improve test coverage of automation extraction functions (#94878) 2023-06-19 23:05:20 +02:00
Erik Montnemery 5d138b64d9
Improve test coverage of script (#94883) 2023-06-19 22:40:49 +02:00
Erik Montnemery 5303bef83e
Add image entity component (#90564) 2023-06-19 17:03:48 +02:00
Erik Montnemery 3ee63ba2c2
Add tests for kitchen_sink sensor platform (#94724)
* Add tests for kitchen_sink sensor platform

* Address review comments
2023-06-19 14:16:18 +02:00
Erik Montnemery e49c2fde14
Add tests for kitchen_sink lock platform (#94723) 2023-06-19 13:24:36 +02:00
Mike Heath d3bf52c136
Register Fully Kiosk services regardless of setup result (#88647)
* Register services at integration level

If HA is unable to connect to Fully Kiosk, the services don't get
registered. This can cause repair to create notifications saying
that the 'fully_kiosk.load_url' service is unknown.

Fixes #85444

* Validate config entry is loaded

* Refactor service invocation

Raises `HomeAssistantError` when the user provides an device id that is
not in the device registry or a device that is not a Fully Kiosk
device. If the device's config entry is not loaded, a warning is
logged.

* Update homeassistant/components/fully_kiosk/services.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Assert HomeAssistantError when integration unloaded

* Remove unused import

* Set CONFIG_SCHEMA

* Update homeassistant/components/fully_kiosk/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Add test for non fkb devices targets in service calls

* Apply suggestions from code review

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-19 13:12:04 +02:00
Ernst Klamer 13a217ad89
Bump bthome to 2.12.0 (#94822) 2023-06-18 15:06:09 -05:00
starkillerOG ee7f44b3da
Bump reolink-aio to 0.7.1 (#94761) 2023-06-18 13:13:21 +02:00
Joost Lekkerkerker 9f83e4b2de
Make YouTube select lower quality thumbnails (#94652)
* Make YouTube select lower quality thumbnails

* Make YouTube select lower quality thumbnails

* Make YouTube select lower quality thumbnails

* Make YouTube select lower quality thumbnails

* Add tests

* Add tests

* Add tests

* Add tests

* Add tests
2023-06-17 21:59:06 -04:00
Eric Severance 7f7b7aee6d
pyWeMo serialnumber is deprecated, use serial_number (#94791) 2023-06-17 20:59:19 -04:00
Erik Montnemery 4f669b326f
Fix typo in tts tests (#94725) 2023-06-16 21:08:14 -04:00
J. Nick Koston 68cf796be8
Speed up entity service calls (#94731)
* Speed up entity service calls

- Avoid permissions check if the caller is an admin
- Use set intersection instead of linear search of entity platforms to find entities

* tweak

* fix light test to not use an admin user
2023-06-16 21:07:57 -04:00
Allen Porter 12129e9d21
Update service call return values and error handling (#94657)
* Update return signature of service calls

* Add timeout error handling in websocket api for service calls

* Update recorder tests to remove assertion on service call

* Remove timeout behavior and update callers that depend on it today

* Fix tests

* Add missing else

* await coro directly

* Fix more tests

* Update the intent task to use wait instead of timeout

* Remove script service call limits and limit constants

* Update tests that depend on service call limits

* Use wait instead of wait_for and add test

* Update homeassistant/helpers/intent.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-16 07:01:40 -07:00
Erik Montnemery 92bba4d7be
Fix typo in binary_sensor tests (#94712) 2023-06-16 13:57:42 +02:00
Raman Gupta 934e1a1603
Fix zwave_js trigger event reattach logic (#94702) 2023-06-16 09:35:29 +02:00
Franck Nijhof be05a749c5
Add preheating HVAC action to climate (#94677)
* Add preheating HVAC action to climate

* Fix MQTT tests
2023-06-15 22:16:12 -04:00
Jan Bouwhuis 5e55f83cbc
Correct imap sensor measurement class and add suggested precision (#94060)
* Fix imap sensor measurement class and precision

* Test measurement class is set correctly

* Remove unrelated changes

* Move EntityDescription to module level
2023-06-16 00:44:58 +02:00
Erik Montnemery 334dacc322
Change Entity.name default to UNDEFINED (#94574)
* Change Entity.name default to UNDEFINED

* Update typing

* Update Pylint plugin

* Update TTS test
2023-06-15 11:09:53 +02:00
J. Nick Koston d369d679c7
Fix ESPHome entries reloading after startup when dashboard is in use (#94362) 2023-06-14 21:16:39 -10:00
epenet 580b09d0f2
Refactor XML parsing in rest (#94268)
* Refactor XML parsing in rest

* Adjust caplog check

* Adjust

* Rename

* Simplify
2023-06-15 09:15:25 +02:00
J. Nick Koston 2a5ffa9a5b
Fix timestamps for bluetooth scanners that bundle advertisements (#94511)
#94138 added support for raw/bundled advertisements. We should use the
same monotonic time for all advertisements in the bundle if not time
is passed, or calculate the timestamp and pass it if its known
2023-06-14 21:47:00 -04:00
puddly 22dfa8797f
Bump ZHA dependencies (#93989)
* Make `find_entity_id` synchronous

* Remove `tries`

* Use new `attribute_updated` event signature

* Validate attributes before creating entities

* Avoid swallowing exceptions when opening covers

* Bump ZHA dependencies

* Add a matcher for Sinope water leak sensors using a non-standard ZCL attribute

* Ensure handler matching is strict, not multi

* Add type annotations for newly-updated functions
2023-06-14 21:42:31 -04:00
J. Nick Koston e0ae7a31fe
Remove _raw from zeroconf properties (#94615)
* Remove _raw from zeroconf properties

This was added in #31059 but it appears it was never used.

To preserve backwards compatibility, properties are still decoded
but utf-8 errors are replaced instead of dropped

* Remove _raw from zeroconf properties

This was added in #31059 but it appears it was never used.

To preserve backwards compatibility, properties are still decoded
but utf-8 errors are replaced instead of dropped
2023-06-14 21:31:52 -04:00
Maciej Bieniek 7b3f100efb
Catch InvalidAuthError in `shutdown()` method for Shelly gen2 devices (#94563)
* Catch InvalidAuthError in shutdown() method

* Add test

* Revert unwanted change in tests
2023-06-15 00:00:21 +03:00
Erik Montnemery f68ed8b7a0
Always setup demo platforms with device support from config entry (#94601)
* Always setup demo platforms with device support from config entry

* Update tests depending on the demo integration
2023-06-14 21:03:07 +02:00
J. Nick Koston a0c023d5cb
Reduce overhead to lookup items in the entity and device registry (#94568) 2023-06-14 20:47:18 +02:00
Erik Montnemery 9a3077d64a
Always setup demo platforms with device support from config entry (#94586)
* Always setup demo platforms with device support from config entry

* Adjust test fixutres

* Update tests depending on the demo integration
2023-06-14 16:50:35 +02:00
Erik Montnemery 1b8c72e644
Remove legacy STT provider from the demo integration (#94585) 2023-06-14 14:55:50 +02:00
Erik Montnemery e5b2801f5b
Fix ZHA tests (#94588) 2023-06-14 14:21:34 +02:00
Erik Montnemery 2406b235b4
Name unnamed binary sensors by their device class (#92940)
* Name unnamed binary sensors by their device class

* Update type annotations

* Fix loading of entity component translations

* Add test

* Update integrations

* Set abode and rfxtrx binary_sensor name to None

* Revert changes in homekit_controller
2023-06-13 19:48:54 +02:00
Yuxin Wang b1bdd92383
Add unit inference for Amps and VA in APCUPSD integration (#94431)
* Add unit inference for Amps and VA

* Rename `init_integration` to `async_init_integration` for better consistency with HA naming style
2023-06-13 16:38:56 +02:00
Joakim Sørensen 889f3c36fc
Adjust default name in backup service calls to match documentation (#94468) 2023-06-13 11:41:53 +02:00
Raman Gupta f3ca3a8ee0
Set default value for endpoint in zwave device automations (#94445)
* Set default value for endpoint in zwave device automations

* add test case
2023-06-12 21:34:09 -04:00
G Johansson bd74f03d0b
Fix reload service in Command Line (#94436)
* Fix reload in Command Line

* Add read new yaml
2023-06-12 21:51:57 +02:00
G Johansson f931cc3d1c
Fix manual update for Command Line (#94433)
Manual update command line
2023-06-12 21:50:23 +02:00
Jan Bouwhuis 82b9a31ea7
Improve logging of mqtt discovery message errors (#94491)
* Improve logging on mqtt discovery message errors

* Create shared helper

* Apply suggestion

* Catch base class vol.Invalid
2023-06-12 21:28:28 +02:00
Luke 5cdb65100f
Add Roborock DnD switch (#94474)
* add Dnd switch

* add dnd test

* fix typing
2023-06-12 20:30:15 +02:00
Jan Bouwhuis c756c7aceb
Cleanup help_setup_helper in common mqtt tests (#94482) 2023-06-12 20:18:05 +02:00
jasonkuster a25f3c9b27
Fix ZHA binding api to actually return responses (#94388) 2023-06-12 13:07:42 -04:00
Erik Montnemery 86f2aa84e5
Fix flaky ESPHome test fixture (#94465) 2023-06-12 16:59:11 +02:00
Franck Nijhof eb2b1d2970
Add diagnostic support to Rituals Perfume Genie (#94373) 2023-06-12 11:33:47 +02:00
G Johansson ce02261303
Remove Brottsplatskartan YAML configuration (#94101)
Remove platform yaml
2023-06-12 11:28:21 +02:00
G Johansson f2cf92050a
Remove Workday YAML configuration (#94102)
Remove platform yaml from workday
2023-06-12 11:27:37 +02:00
Tom Harris 3eedbe92ad
Fix issue with Insteon linked devices maintaining current state (#94286)
* Bump pyinsteon

* Update tests
2023-06-11 10:21:33 -04:00
Jan-Philipp Benecke 7d0f5733c2
Improve the code quality of the Discovergy integration (#94165)
* Remove option flow, refactor and improve the code quality after review in PR #54280

* Remove coordinator.py from coverage report

* Some minor improvements for unit tests

* Remove _LOGGER

* Use pytest.fixture and some more improvments

* Add back empty __init__

* Fix docstring

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-11 12:51:43 +02:00
Joost Lekkerkerker a8dd2d520a
Abort youtube configuration if user has no channel (#94402)
* Abort configuration if user has no channel

* Clean up

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-11 12:30:38 +02:00
Raman Gupta 41d8ba3397
Re-add event listeners after Z-Wave server disconnection (#94383)
* Re-add event listeners after Z-Wave server disconnection

* switch order

* Add tests
2023-06-11 08:35:52 +02:00
Luke eab024992e
Add Cleaning area sensors to Roborock (#94200)
add clean area sensor
2023-06-10 20:31:34 -04:00
jimmyd-be 3d678f5b99
Renson integration (#56374)
* Implemented Renson integration

* -  renamed component to a better name
- Made cleaner code by splitting up files into different one
-  Fixed issues regarding getting data from library
- Added service.yaml file

* Added Renson services

* cleanup translations

* added config_flow tests

* changed config_flow, removed all services

* use SensorEntityDescription + introduced new binarySensor

* fixed config_flow test

* renamed renson_endura_delta to renson

* refactored sensors and implemented binary_sensor

* Changed some sensors to non measurement and added entity_registery_enabled_default for config sensors

* Enabled binary_sensor

* changed import to new renamed module

* Merge files into correct files + cleaned some code

* Change use of EntityDescription

* Update codeowners

* Fixed lint issues

* Fix sensor

* Create test.yml

* Update test.yml

* add github action tests

* Format json files

* Remove deprecated code

* Update homeassistant/components/renson/binary_sensor.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Use Coordinqte in Sensor

* Migrated binary sensor to use coordinate

* Removed firmwareSensor

* Add entity_catogory to binary_sensor

* Add services

* Revert "Add services"

This reverts commit 028760d8d8.

* update requirements of Renson integration

* Add services and fan

* Fixed some issue + fixed PR comments

* Cleanup code

* Go back 2 years ago to the bare minimum for PR approval

* Refactored code and added a lot of device classes to the entities

* Fix some bugs

* Add unique Id and some device class

* Show the level value for CURRENT_LEVEL_FIELD instead of the raw data

* Remove FILTER_PRESET_FIELD for now

* Make the _attr_unique_id unique

* Changed Renson tests

* Moved Renson hass data into @dataclass

* Changed test + added files to .coveragerc

* Add device_class=SensorDeviceClass.Duration

* Fix syntax

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-10 09:21:33 +02:00
Erik Montnemery 59f5b8f2d6
Remove unneeded checks for Entity.platform (#94321)
* Remove unneeded checks for Entity.platform

* Update tests

* Prevent breaking integrations without an EntityComponent

* Warn when entity has no platform
2023-06-09 15:17:41 +02:00
Jan Bouwhuis c984604a6c
Refactor some mqtt tests not the just use schema validation (#94330)
Remove help_test_validate_platform_config
2023-06-09 12:30:26 +02:00
Erik Montnemery 4085c4f6d8
Tweak typing of Entity.platform (#88321)
* Tweak typing of Entity.platform

* Fix mypy errors

* Fix update test

* Improve comments
2023-06-09 10:56:04 +02:00
Luke dafc7a15b1
Bump Python-Roborock to 23.6 for crash fix (#94281)
* bump to 23.5

* update to 23.5
2023-06-08 18:18:42 -07:00
Franck Nijhof c3936e6f14
Replace isort with ruff (#94302) 2023-06-08 23:43:56 +02:00
Joost Lekkerkerker ed3d38bb17
Request steam online friends from batches (#91167)
* Request friends from batches

* Add tests

* Add tests

* Fix feedback

* Add libcall to verify request length

* Improve tests
2023-06-08 17:08:14 -04:00
Erik Montnemery 23d15850da
Use addon name as title in otbr hassio flow (#87081)
* Use addon name as title in otbr hassio flow

* Address review comments
2023-06-08 23:04:12 +02:00
Joost Lekkerkerker b3a001996d
Improve coverage for LastFM (#93661)
* Improve coverage for LastFM

* Improve tests

* Improve tests
2023-06-08 16:55:16 -04:00
Ville Skyttä ca936d0b38
Replace bandit with ruff (#93200) 2023-06-08 22:46:04 +02:00
Erik Montnemery c8756ba5bb
Use stable USB device path in USB discovery (#94266) 2023-06-08 18:27:04 +02:00
hookedonunix 18cbc9b4c3
Add Water Heater platform to MQTT integration (#93644)
* Add Water Heater entity to MQTT

* Adding tests for Water Heater

* Remove duplicate line and unneeded var declaration

* Remove target temp range and away mode

* Move common Temperature Control conf to const

* Remove unnecessary platform schema and temp check

* Add common value template key test

* Use MqttTemperatureControl in Water Heater

* Move operation mode out of MqttTemperatureControl

* Remove unecessary attribute declaration

* Remove default min/max temp and auto init attr

* Fix mqtt water heater initial temp conversion

* Make async_set_temperature common

* Fix init temp comment

* Merge value_template_keys into get_with_templates

* Remove unnecessary operation_mode overriding

* Add async_set_temperature to water heater

* Fix docstring comments
2023-06-08 17:38:30 +02:00
Joost Lekkerkerker 20449d1f01
Catch exception when user has no lastfm friends (#94235) 2023-06-08 16:08:18 +02:00