mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
2022.12.5 (#83944)
This commit is contained in:
commit
47a7807cbd
@ -264,6 +264,12 @@ class BraviaTVOptionsFlowHandler(config_entries.OptionsFlowWithConfigEntry):
|
|||||||
|
|
||||||
sources = coordinator.source_map.values()
|
sources = coordinator.source_map.values()
|
||||||
source_list = [item["title"] for item in sources]
|
source_list = [item["title"] for item in sources]
|
||||||
|
ignored_sources = self.options.get(CONF_IGNORED_SOURCES, [])
|
||||||
|
|
||||||
|
for item in ignored_sources:
|
||||||
|
if item not in source_list:
|
||||||
|
source_list.append(item)
|
||||||
|
|
||||||
self.data_schema = vol.Schema(
|
self.data_schema = vol.Schema(
|
||||||
{
|
{
|
||||||
vol.Optional(CONF_IGNORED_SOURCES): cv.multi_select(source_list),
|
vol.Optional(CONF_IGNORED_SOURCES): cv.multi_select(source_list),
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "Google Cast",
|
"name": "Google Cast",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/cast",
|
"documentation": "https://www.home-assistant.io/integrations/cast",
|
||||||
"requirements": ["pychromecast==13.0.3"],
|
"requirements": ["pychromecast==13.0.4"],
|
||||||
"after_dependencies": [
|
"after_dependencies": [
|
||||||
"cloud",
|
"cloud",
|
||||||
"http",
|
"http",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"domain": "frontend",
|
"domain": "frontend",
|
||||||
"name": "Home Assistant Frontend",
|
"name": "Home Assistant Frontend",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/frontend",
|
"documentation": "https://www.home-assistant.io/integrations/frontend",
|
||||||
"requirements": ["home-assistant-frontend==20221212.0"],
|
"requirements": ["home-assistant-frontend==20221213.0"],
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"api",
|
"api",
|
||||||
"auth",
|
"auth",
|
||||||
|
@ -30,4 +30,4 @@ class JustNimbusEntity(
|
|||||||
@property
|
@property
|
||||||
def available(self) -> bool:
|
def available(self) -> bool:
|
||||||
"""Return device availability."""
|
"""Return device availability."""
|
||||||
return super().available and getattr(self.coordinator.data, "error_code") == 0
|
return super().available and self.coordinator.data is not None
|
||||||
|
@ -8,7 +8,7 @@ from .backports.enum import StrEnum
|
|||||||
APPLICATION_NAME: Final = "HomeAssistant"
|
APPLICATION_NAME: Final = "HomeAssistant"
|
||||||
MAJOR_VERSION: Final = 2022
|
MAJOR_VERSION: Final = 2022
|
||||||
MINOR_VERSION: Final = 12
|
MINOR_VERSION: Final = 12
|
||||||
PATCH_VERSION: Final = "4"
|
PATCH_VERSION: Final = "5"
|
||||||
__short_version__: Final = f"{MAJOR_VERSION}.{MINOR_VERSION}"
|
__short_version__: Final = f"{MAJOR_VERSION}.{MINOR_VERSION}"
|
||||||
__version__: Final = f"{__short_version__}.{PATCH_VERSION}"
|
__version__: Final = f"{__short_version__}.{PATCH_VERSION}"
|
||||||
REQUIRED_PYTHON_VER: Final[tuple[int, int, int]] = (3, 9, 0)
|
REQUIRED_PYTHON_VER: Final[tuple[int, int, int]] = (3, 9, 0)
|
||||||
|
@ -22,7 +22,7 @@ dbus-fast==1.75.0
|
|||||||
fnvhash==0.1.0
|
fnvhash==0.1.0
|
||||||
hass-nabucasa==0.61.0
|
hass-nabucasa==0.61.0
|
||||||
home-assistant-bluetooth==1.8.1
|
home-assistant-bluetooth==1.8.1
|
||||||
home-assistant-frontend==20221212.0
|
home-assistant-frontend==20221213.0
|
||||||
httpx==0.23.1
|
httpx==0.23.1
|
||||||
ifaddr==0.1.7
|
ifaddr==0.1.7
|
||||||
janus==1.0.0
|
janus==1.0.0
|
||||||
|
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "homeassistant"
|
name = "homeassistant"
|
||||||
version = "2022.12.4"
|
version = "2022.12.5"
|
||||||
license = {text = "Apache-2.0"}
|
license = {text = "Apache-2.0"}
|
||||||
description = "Open-source home automation platform running on Python 3."
|
description = "Open-source home automation platform running on Python 3."
|
||||||
readme = "README.rst"
|
readme = "README.rst"
|
||||||
|
@ -884,7 +884,7 @@ hole==0.7.0
|
|||||||
holidays==0.17.2
|
holidays==0.17.2
|
||||||
|
|
||||||
# homeassistant.components.frontend
|
# homeassistant.components.frontend
|
||||||
home-assistant-frontend==20221212.0
|
home-assistant-frontend==20221213.0
|
||||||
|
|
||||||
# homeassistant.components.home_connect
|
# homeassistant.components.home_connect
|
||||||
homeconnect==0.7.2
|
homeconnect==0.7.2
|
||||||
@ -1504,7 +1504,7 @@ pycfdns==2.0.1
|
|||||||
pychannels==1.2.3
|
pychannels==1.2.3
|
||||||
|
|
||||||
# homeassistant.components.cast
|
# homeassistant.components.cast
|
||||||
pychromecast==13.0.3
|
pychromecast==13.0.4
|
||||||
|
|
||||||
# homeassistant.components.pocketcasts
|
# homeassistant.components.pocketcasts
|
||||||
pycketcasts==1.0.1
|
pycketcasts==1.0.1
|
||||||
|
@ -664,7 +664,7 @@ hole==0.7.0
|
|||||||
holidays==0.17.2
|
holidays==0.17.2
|
||||||
|
|
||||||
# homeassistant.components.frontend
|
# homeassistant.components.frontend
|
||||||
home-assistant-frontend==20221212.0
|
home-assistant-frontend==20221213.0
|
||||||
|
|
||||||
# homeassistant.components.home_connect
|
# homeassistant.components.home_connect
|
||||||
homeconnect==0.7.2
|
homeconnect==0.7.2
|
||||||
@ -1077,7 +1077,7 @@ pybravia==0.2.3
|
|||||||
pycfdns==2.0.1
|
pycfdns==2.0.1
|
||||||
|
|
||||||
# homeassistant.components.cast
|
# homeassistant.components.cast
|
||||||
pychromecast==13.0.3
|
pychromecast==13.0.4
|
||||||
|
|
||||||
# homeassistant.components.comfoconnect
|
# homeassistant.components.comfoconnect
|
||||||
pycomfoconnect==0.4
|
pycomfoconnect==0.4
|
||||||
|
@ -422,6 +422,19 @@ async def test_options_flow(hass: HomeAssistant) -> None:
|
|||||||
assert result["type"] == data_entry_flow.FlowResultType.CREATE_ENTRY
|
assert result["type"] == data_entry_flow.FlowResultType.CREATE_ENTRY
|
||||||
assert config_entry.options == {CONF_IGNORED_SOURCES: ["HDMI 1", "HDMI 2"]}
|
assert config_entry.options == {CONF_IGNORED_SOURCES: ["HDMI 1", "HDMI 2"]}
|
||||||
|
|
||||||
|
# Test that saving with missing sources is ok
|
||||||
|
with patch(
|
||||||
|
"pybravia.BraviaTV.get_external_status",
|
||||||
|
return_value=BRAVIA_SOURCES[1:],
|
||||||
|
):
|
||||||
|
result = await hass.config_entries.options.async_init(config_entry.entry_id)
|
||||||
|
result = await hass.config_entries.options.async_configure(
|
||||||
|
result["flow_id"], user_input={CONF_IGNORED_SOURCES: ["HDMI 1"]}
|
||||||
|
)
|
||||||
|
await hass.async_block_till_done()
|
||||||
|
assert result["type"] == data_entry_flow.FlowResultType.CREATE_ENTRY
|
||||||
|
assert config_entry.options == {CONF_IGNORED_SOURCES: ["HDMI 1"]}
|
||||||
|
|
||||||
|
|
||||||
async def test_options_flow_error(hass: HomeAssistant) -> None:
|
async def test_options_flow_error(hass: HomeAssistant) -> None:
|
||||||
"""Test config flow options."""
|
"""Test config flow options."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user