hass-core/tests
Michael Chisholm a28fd7d61b
Config-flow for DLNA-DMR integration (#55267)
* Modernize dlna_dmr component: configflow, test, types

* Support config-flow with ssdp discovery
* Add unit tests
* Enforce strict typing
* Gracefully handle network devices (dis)appearing

* Fix Aiohttp mock response headers type to match actual response class

* Fixes from code review

* Fixes from code review

* Import device config in flow if unavailable at hass start

* Support SSDP advertisements

* Ignore bad BOOTID, fix ssdp:byebye handling

* Only listen for events on interface connected to device

* Release all listeners when entities are removed

* Warn about deprecated dlna_dmr configuration

* Use sublogger for dlna_dmr.config_flow for easier filtering

* Tests for dlna_dmr.data module

* Rewrite DMR tests for HA style

* Fix DMR strings: "Digital Media *Renderer*"

* Update DMR entity state and device info when changed

* Replace deprecated async_upnp_client State with TransportState

* supported_features are dynamic, based on current device state

* Cleanup fully when subscription fails

* Log warnings when device connection fails unexpectedly

* Set PARALLEL_UPDATES to unlimited

* Fix spelling

* Fixes from code review

* Simplify has & can checks to just can, which includes has

* Treat transitioning state as playing (not idle) to reduce UI jerking

* Test if device is usable

* Handle ssdp:update messages properly

* Fix _remove_ssdp_callbacks being shared by all DlnaDmrEntity instances

* Fix tests for transitioning state

* Mock DmrDevice.is_profile_device (added to support embedded devices)

* Use ST & NT SSDP headers to find DMR devices, not deviceType

The deviceType is extracted from the device's description XML, and will not
be what we want when dealing with embedded devices.

* Use UDN from SSDP headers, not device description, as unique_id

The SSDP headers have the UDN of the embedded device that we're interested
in, whereas the device description (`ATTR_UPNP_UDN`) field will always be
for the root device.

* Fix DMR string English localization

* Test config flow with UDN from SSDP headers

* Bump async-upnp-client==0.22.1, fix flake8 error

* fix test for remapping

* DMR HA Device connections based on root and embedded UDN

* DmrDevice's UpnpDevice is now named profile_device

* Use device type from SSDP headers, not device description

* Mark dlna_dmr constants as Final

* Use embedded device UDN and type for unique ID when connected via URL

* More informative connection error messages

* Also match SSDP messages on NT headers

The NT header is to ssdp:alive messages what ST is to M-SEARCH responses.

* Bump async-upnp-client==0.22.2

* fix merge

* Bump async-upnp-client==0.22.3

Co-authored-by: Steven Looman <steven.looman@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-27 15:47:01 -05:00
..
auth Bump PyJWT to 2.1.0 (#55911) 2021-09-07 20:59:02 -07:00
components Config-flow for DLNA-DMR integration (#55267) 2021-09-27 15:47:01 -05:00
fixtures Add support for multilevel switch CC select entities (#56656) 2021-09-26 14:22:41 -04:00
hassfest Validate requirements format in hassfest (#55094) 2021-08-24 08:51:07 +02:00
helpers Add is_number template filter and function (#56705) 2021-09-27 10:47:57 +02:00
mock
resources
scripts Allow IntegrationNotFound when checking config in safe mode (#56283) 2021-09-17 22:25:50 -07:00
test_util Config-flow for DLNA-DMR integration (#55267) 2021-09-27 15:47:01 -05:00
testing_config Add support for white to light groups (#55082) 2021-08-23 18:29:44 +02:00
util Drop unused ruamel (#55672) 2021-09-03 22:17:10 -07:00
__init__.py
bandit.yaml
common.py Index config entries by domain (#56316) 2021-09-17 10:39:00 -10:00
conftest.py Add 5-minute statistics for sensors (#56006) 2021-09-16 10:57:15 +02:00
ignore_uncaught_exceptions.py
test_bootstrap.py Report integrations that block startup wrap up (#56003) 2021-09-09 20:39:22 -07:00
test_config.py Ensure internal/external URL have no path (#54304) 2021-08-09 09:38:09 +02:00
test_config_entries.py Fix race that allowed multiple config flows with the same unique id (#55131) 2021-08-23 23:01:21 -05:00
test_core.py Fix external internal url core check (#54310) 2021-08-09 10:52:14 +02:00
test_data_entry_flow.py
test_exceptions.py
test_loader.py Bump awesomeversion to 21.8.1 (#55817) 2021-09-11 11:40:46 -07:00
test_main.py
test_requirements.py Avoid checking if a package is installed if it already failed (#56698) 2021-09-26 22:32:25 -07:00
test_runner.py Avoid deadlock on shutdown when a task is shielded from cancelation (#56499) 2021-09-21 14:35:14 -07:00
test_setup.py