* Fix consider-using-tuple pylint warnings in component tests
* Apply su
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
---------
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Reduce overhead to write dlna_dmr state
- Only update supported_features once per state write cycle
- Use a dict lookup for state
* useless dispatch
* fix tests
* remove unreachable code
The entity was removed before the entity registry could update it
```
Traceback (most recent call last):
File "/Users/bdraco/home-assistant/homeassistant/helpers/entity.py", line 1482, in _async_process_registry_update_or_remove
assert registry_entry is not None
AssertionError
```
* Avoid delaying startup in dlna_dmr
fixes#109834
* make sure device info is linked up at startup
* fixes
* update tests
* startup only
* override device info if we have it
* fixes
* make sure its set right away when adding the device
* revert test changes
* coverage
* coverage
* coverage
* coverage
* adjust
* fixes
* more fixes
* coverage
* coverage
* coverage
* tweaks
* tweaks
* Revert "revert test changes"
This reverts commit 014d29297d.
* coverage
* coverage
* Switch back to using call_later for the slow entity update warning
I had originally changed this to create a task and wait
in #41184 but that does not make sense anymore with newer
cpython as the profile now shows the original method is cheaper
(or I did it wrong the first time)
* fix missing block till done since there is no longer a task being created which would run the event loop once
* Factor out _is_dmr_device function
* Use DMR device's MAC to match existing config entries
Some DMR devices change their every time they boot, against the DMR specs.
Try to match such devices to existing config entries by using their MAC
addresses.
* Add DMR device's MAC as a device_registry connection
* Use doc-only IPs (RFC5737) for dlna_dmr tests
* Fix incorrect types of test data structures
* Loosen MIME-type filtering for async_browse_media
* Add option to not filter results when browsing media
Some devices do not report all that they support, and in this case
filtering will hide media that's actually playable. Most devices are OK,
though, and it's better to hide what they can't play. Add an option, off by
default, to show all media.
* Fix linting issues