mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Bump aiowebostv to 0.7.4 (#148273)
This commit is contained in:
parent
a5d6bfd1b3
commit
f02c1b0d4e
@ -98,7 +98,10 @@ class FlowHandler(ConfigFlow, domain=DOMAIN):
|
||||
data = {CONF_HOST: self._host, CONF_CLIENT_SECRET: client.client_key}
|
||||
|
||||
if not self._name:
|
||||
self._name = f"{DEFAULT_NAME} {client.tv_info.system['modelName']}"
|
||||
if model_name := client.tv_info.system.get("modelName"):
|
||||
self._name = f"{DEFAULT_NAME} {model_name}"
|
||||
else:
|
||||
self._name = DEFAULT_NAME
|
||||
return self.async_create_entry(title=self._name, data=data)
|
||||
|
||||
return self.async_show_form(step_id="pairing", errors=errors)
|
||||
|
@ -6,7 +6,7 @@
|
||||
"documentation": "https://www.home-assistant.io/integrations/webostv",
|
||||
"iot_class": "local_push",
|
||||
"loggers": ["aiowebostv"],
|
||||
"requirements": ["aiowebostv==0.7.3"],
|
||||
"requirements": ["aiowebostv==0.7.4"],
|
||||
"ssdp": [
|
||||
{
|
||||
"st": "urn:lge-com:service:webos-second-screen:1"
|
||||
|
2
requirements_all.txt
generated
2
requirements_all.txt
generated
@ -435,7 +435,7 @@ aiowatttime==0.1.1
|
||||
aiowebdav2==0.4.6
|
||||
|
||||
# homeassistant.components.webostv
|
||||
aiowebostv==0.7.3
|
||||
aiowebostv==0.7.4
|
||||
|
||||
# homeassistant.components.withings
|
||||
aiowithings==3.1.6
|
||||
|
2
requirements_test_all.txt
generated
2
requirements_test_all.txt
generated
@ -417,7 +417,7 @@ aiowatttime==0.1.1
|
||||
aiowebdav2==0.4.6
|
||||
|
||||
# homeassistant.components.webostv
|
||||
aiowebostv==0.7.3
|
||||
aiowebostv==0.7.4
|
||||
|
||||
# homeassistant.components.withings
|
||||
aiowithings==3.1.6
|
||||
|
@ -4,7 +4,12 @@ from aiowebostv import WebOsTvPairError
|
||||
import pytest
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.components.webostv.const import CONF_SOURCES, DOMAIN, LIVE_TV_APP_ID
|
||||
from homeassistant.components.webostv.const import (
|
||||
CONF_SOURCES,
|
||||
DEFAULT_NAME,
|
||||
DOMAIN,
|
||||
LIVE_TV_APP_ID,
|
||||
)
|
||||
from homeassistant.config_entries import SOURCE_SSDP
|
||||
from homeassistant.const import CONF_CLIENT_SECRET, CONF_HOST, CONF_SOURCE
|
||||
from homeassistant.core import HomeAssistant
|
||||
@ -63,6 +68,29 @@ async def test_form(hass: HomeAssistant, client) -> None:
|
||||
assert config_entry.unique_id == FAKE_UUID
|
||||
|
||||
|
||||
async def test_form_no_model_name(hass: HomeAssistant, client) -> None:
|
||||
"""Test successful user flow without model name."""
|
||||
client.tv_info.system = {}
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
context={CONF_SOURCE: config_entries.SOURCE_USER},
|
||||
data=MOCK_USER_CONFIG,
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "pairing"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"], user_input={}
|
||||
)
|
||||
|
||||
assert result["type"] is FlowResultType.CREATE_ENTRY
|
||||
assert result["title"] == DEFAULT_NAME
|
||||
config_entry = result["result"]
|
||||
assert config_entry.unique_id == FAKE_UUID
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("apps", "inputs"),
|
||||
[
|
||||
|
Loading…
x
Reference in New Issue
Block a user