mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Merge pull request #43400 from home-assistant/rc
This commit is contained in:
commit
e9d895d283
@ -146,6 +146,14 @@ RESET_ACCESSORY_SERVICE_SCHEMA = vol.Schema(
|
||||
)
|
||||
|
||||
|
||||
def _async_get_entries_by_name(current_entries):
|
||||
"""Return a dict of the entries by name."""
|
||||
|
||||
# For backwards compat, its possible the first bridge is using the default
|
||||
# name.
|
||||
return {entry.data.get(CONF_NAME, BRIDGE_NAME): entry for entry in current_entries}
|
||||
|
||||
|
||||
async def async_setup(hass: HomeAssistant, config: dict):
|
||||
"""Set up the HomeKit from yaml."""
|
||||
hass.data.setdefault(DOMAIN, {})
|
||||
@ -156,8 +164,7 @@ async def async_setup(hass: HomeAssistant, config: dict):
|
||||
return True
|
||||
|
||||
current_entries = hass.config_entries.async_entries(DOMAIN)
|
||||
|
||||
entries_by_name = {entry.data[CONF_NAME]: entry for entry in current_entries}
|
||||
entries_by_name = _async_get_entries_by_name(current_entries)
|
||||
|
||||
for index, conf in enumerate(config[DOMAIN]):
|
||||
if _async_update_config_entry_if_from_yaml(hass, entries_by_name, conf):
|
||||
@ -384,7 +391,7 @@ def _async_register_events_and_services(hass: HomeAssistant):
|
||||
return
|
||||
|
||||
current_entries = hass.config_entries.async_entries(DOMAIN)
|
||||
entries_by_name = {entry.data[CONF_NAME]: entry for entry in current_entries}
|
||||
entries_by_name = _async_get_entries_by_name(current_entries)
|
||||
|
||||
for conf in config[DOMAIN]:
|
||||
_async_update_config_entry_if_from_yaml(hass, entries_by_name, conf)
|
||||
|
@ -37,6 +37,7 @@ from .const import (
|
||||
STORAGE_DASHBOARD_UPDATE_FIELDS,
|
||||
url_slug,
|
||||
)
|
||||
from .system_health import system_health_info # NOQA
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
"name": "Tasmota (beta)",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/tasmota",
|
||||
"requirements": ["hatasmota==0.0.31"],
|
||||
"requirements": ["hatasmota==0.0.32"],
|
||||
"dependencies": ["mqtt"],
|
||||
"mqtt": ["tasmota/discovery/#"],
|
||||
"codeowners": ["@emontnemery"]
|
||||
|
@ -2,7 +2,7 @@
|
||||
"domain": "vizio",
|
||||
"name": "VIZIO SmartCast",
|
||||
"documentation": "https://www.home-assistant.io/integrations/vizio",
|
||||
"requirements": ["pyvizio==0.1.56"],
|
||||
"requirements": ["pyvizio==0.1.57"],
|
||||
"codeowners": ["@raman325"],
|
||||
"config_flow": true,
|
||||
"zeroconf": ["_viziocast._tcp.local."],
|
||||
|
@ -4,7 +4,7 @@ import logging
|
||||
|
||||
from httpcore import ConnectError, ConnectTimeout
|
||||
from wolf_smartset.token_auth import InvalidAuth
|
||||
from wolf_smartset.wolf_client import WolfClient
|
||||
from wolf_smartset.wolf_client import FetchFailed, WolfClient
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
||||
@ -56,6 +56,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
|
||||
raise UpdateFailed(
|
||||
f"Error communicating with API: {exception}"
|
||||
) from exception
|
||||
except FetchFailed as exception:
|
||||
raise UpdateFailed(
|
||||
f"Could not fetch values from server due to: {exception}"
|
||||
) from exception
|
||||
except InvalidAuth as exception:
|
||||
raise UpdateFailed("Invalid authentication during update.") from exception
|
||||
|
||||
|
@ -3,6 +3,6 @@
|
||||
"name": "Wolf SmartSet Service",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/wolflink",
|
||||
"requirements": ["wolf_smartset==0.1.6"],
|
||||
"requirements": ["wolf_smartset==0.1.8"],
|
||||
"codeowners": ["@adamkrol93"]
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
"""Constants used by Home Assistant components."""
|
||||
MAJOR_VERSION = 0
|
||||
MINOR_VERSION = 118
|
||||
PATCH_VERSION = "0"
|
||||
PATCH_VERSION = "1"
|
||||
__short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}"
|
||||
__version__ = f"{__short_version__}.{PATCH_VERSION}"
|
||||
REQUIRED_PYTHON_VER = (3, 7, 1)
|
||||
|
@ -741,7 +741,7 @@ hass-nabucasa==0.37.2
|
||||
hass_splunk==0.1.1
|
||||
|
||||
# homeassistant.components.tasmota
|
||||
hatasmota==0.0.31
|
||||
hatasmota==0.0.32
|
||||
|
||||
# homeassistant.components.jewish_calendar
|
||||
hdate==0.9.12
|
||||
@ -1876,7 +1876,7 @@ pyversasense==0.0.6
|
||||
pyvesync==1.2.0
|
||||
|
||||
# homeassistant.components.vizio
|
||||
pyvizio==0.1.56
|
||||
pyvizio==0.1.57
|
||||
|
||||
# homeassistant.components.velux
|
||||
pyvlx==0.2.18
|
||||
@ -2286,7 +2286,7 @@ withings-api==2.1.6
|
||||
wled==0.4.4
|
||||
|
||||
# homeassistant.components.wolflink
|
||||
wolf_smartset==0.1.6
|
||||
wolf_smartset==0.1.8
|
||||
|
||||
# homeassistant.components.xbee
|
||||
xbee-helper==0.0.7
|
||||
|
@ -376,7 +376,7 @@ hangups==0.4.11
|
||||
hass-nabucasa==0.37.2
|
||||
|
||||
# homeassistant.components.tasmota
|
||||
hatasmota==0.0.31
|
||||
hatasmota==0.0.32
|
||||
|
||||
# homeassistant.components.jewish_calendar
|
||||
hdate==0.9.12
|
||||
@ -908,7 +908,7 @@ pyvera==0.3.11
|
||||
pyvesync==1.2.0
|
||||
|
||||
# homeassistant.components.vizio
|
||||
pyvizio==0.1.56
|
||||
pyvizio==0.1.57
|
||||
|
||||
# homeassistant.components.volumio
|
||||
pyvolumio==0.1.3
|
||||
@ -1097,7 +1097,7 @@ withings-api==2.1.6
|
||||
wled==0.4.4
|
||||
|
||||
# homeassistant.components.wolflink
|
||||
wolf_smartset==0.1.6
|
||||
wolf_smartset==0.1.8
|
||||
|
||||
# homeassistant.components.xbox
|
||||
xbox-webapi==2.0.8
|
||||
|
@ -22,6 +22,25 @@ async def test_subscribing_config_topic(hass, mqtt_mock, setup_tasmota):
|
||||
assert call_args[2] == 0
|
||||
|
||||
|
||||
async def test_future_discovery_message(hass, mqtt_mock, caplog):
|
||||
"""Test we handle backwards compatible discovery messages."""
|
||||
config = copy.deepcopy(DEFAULT_CONFIG)
|
||||
config["future_option"] = "BEST_SINCE_SLICED_BREAD"
|
||||
config["so"]["another_future_option"] = "EVEN_BETTER"
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.tasmota.discovery.tasmota_get_device_config",
|
||||
return_value={},
|
||||
) as mock_tasmota_get_device_config:
|
||||
await setup_tasmota_helper(hass)
|
||||
|
||||
async_fire_mqtt_message(
|
||||
hass, f"{DEFAULT_PREFIX}/00000049A3BC/config", json.dumps(config)
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
assert mock_tasmota_get_device_config.called
|
||||
|
||||
|
||||
async def test_valid_discovery_message(hass, mqtt_mock, caplog):
|
||||
"""Test discovery callback called."""
|
||||
config = copy.deepcopy(DEFAULT_CONFIG)
|
||||
|
Loading…
x
Reference in New Issue
Block a user