Closed matejdro closed 1 year ago
Any tips on where to add extra tests to improve code coverage?
I'd put it here: https://github.com/JeffLIrion/python-androidtv/blob/428e835ee14ff7f0f274513a2d386c9cc22ab6b5/tests/test_basetv_async.py#L407
Also, please make the same changes in the non-async code.
On Nvidia Shield, power service can sometimes reply with "Failed to write while dumping service". When this happens, power state will be output as
None
, even when device is turned on. This can cause Home Assistant to randomly switch playing -> standby -> playing momentarily.As a workaround, this PR attempts to detect the error and re-send the command when it happens.