Improve LG webosTV (#34147)

* Move consts to const, general cleanup

* Add unique id

* Add default icon

* Set supported features based on sound output

* Update homeassistant/components/webostv/media_player.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Set device class

* Add software_info to client mock

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Aidan Timson 2020-04-14 19:26:13 +01:00 committed by GitHub
parent ba394fd2aa
commit 18478ebd05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 69 additions and 34 deletions

View file

@ -9,7 +9,7 @@ from homeassistant.components.media_player.const import (
ATTR_MEDIA_VOLUME_MUTED,
SERVICE_SELECT_SOURCE,
)
from homeassistant.components.webostv import (
from homeassistant.components.webostv.const import (
ATTR_BUTTON,
ATTR_COMMAND,
DOMAIN,
@ -40,7 +40,9 @@ def client_fixture():
with patch(
"homeassistant.components.webostv.WebOsClient", autospec=True
) as mock_client_class:
yield mock_client_class.return_value
client = mock_client_class.return_value
client.software_info = {"device_id": "a1:b1:c1:d1:e1:f1"}
yield client
async def setup_webostv(hass):