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:
parent
ba394fd2aa
commit
18478ebd05
4 changed files with 69 additions and 34 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue