mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +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):
|
async def async_setup(hass: HomeAssistant, config: dict):
|
||||||
"""Set up the HomeKit from yaml."""
|
"""Set up the HomeKit from yaml."""
|
||||||
hass.data.setdefault(DOMAIN, {})
|
hass.data.setdefault(DOMAIN, {})
|
||||||
@ -156,8 +164,7 @@ async def async_setup(hass: HomeAssistant, config: dict):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
current_entries = hass.config_entries.async_entries(DOMAIN)
|
current_entries = hass.config_entries.async_entries(DOMAIN)
|
||||||
|
entries_by_name = _async_get_entries_by_name(current_entries)
|
||||||
entries_by_name = {entry.data[CONF_NAME]: entry for entry in current_entries}
|
|
||||||
|
|
||||||
for index, conf in enumerate(config[DOMAIN]):
|
for index, conf in enumerate(config[DOMAIN]):
|
||||||
if _async_update_config_entry_if_from_yaml(hass, entries_by_name, conf):
|
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
|
return
|
||||||
|
|
||||||
current_entries = hass.config_entries.async_entries(DOMAIN)
|
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]:
|
for conf in config[DOMAIN]:
|
||||||
_async_update_config_entry_if_from_yaml(hass, entries_by_name, conf)
|
_async_update_config_entry_if_from_yaml(hass, entries_by_name, conf)
|
||||||
|
@ -37,6 +37,7 @@ from .const import (
|
|||||||
STORAGE_DASHBOARD_UPDATE_FIELDS,
|
STORAGE_DASHBOARD_UPDATE_FIELDS,
|
||||||
url_slug,
|
url_slug,
|
||||||
)
|
)
|
||||||
|
from .system_health import system_health_info # NOQA
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "Tasmota (beta)",
|
"name": "Tasmota (beta)",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/tasmota",
|
"documentation": "https://www.home-assistant.io/integrations/tasmota",
|
||||||
"requirements": ["hatasmota==0.0.31"],
|
"requirements": ["hatasmota==0.0.32"],
|
||||||
"dependencies": ["mqtt"],
|
"dependencies": ["mqtt"],
|
||||||
"mqtt": ["tasmota/discovery/#"],
|
"mqtt": ["tasmota/discovery/#"],
|
||||||
"codeowners": ["@emontnemery"]
|
"codeowners": ["@emontnemery"]
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"domain": "vizio",
|
"domain": "vizio",
|
||||||
"name": "VIZIO SmartCast",
|
"name": "VIZIO SmartCast",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/vizio",
|
"documentation": "https://www.home-assistant.io/integrations/vizio",
|
||||||
"requirements": ["pyvizio==0.1.56"],
|
"requirements": ["pyvizio==0.1.57"],
|
||||||
"codeowners": ["@raman325"],
|
"codeowners": ["@raman325"],
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"zeroconf": ["_viziocast._tcp.local."],
|
"zeroconf": ["_viziocast._tcp.local."],
|
||||||
|
@ -4,7 +4,7 @@ import logging
|
|||||||
|
|
||||||
from httpcore import ConnectError, ConnectTimeout
|
from httpcore import ConnectError, ConnectTimeout
|
||||||
from wolf_smartset.token_auth import InvalidAuth
|
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.config_entries import ConfigEntry
|
||||||
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
||||||
@ -56,6 +56,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
|
|||||||
raise UpdateFailed(
|
raise UpdateFailed(
|
||||||
f"Error communicating with API: {exception}"
|
f"Error communicating with API: {exception}"
|
||||||
) from 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:
|
except InvalidAuth as exception:
|
||||||
raise UpdateFailed("Invalid authentication during update.") from exception
|
raise UpdateFailed("Invalid authentication during update.") from exception
|
||||||
|
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
"name": "Wolf SmartSet Service",
|
"name": "Wolf SmartSet Service",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/wolflink",
|
"documentation": "https://www.home-assistant.io/integrations/wolflink",
|
||||||
"requirements": ["wolf_smartset==0.1.6"],
|
"requirements": ["wolf_smartset==0.1.8"],
|
||||||
"codeowners": ["@adamkrol93"]
|
"codeowners": ["@adamkrol93"]
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"""Constants used by Home Assistant components."""
|
"""Constants used by Home Assistant components."""
|
||||||
MAJOR_VERSION = 0
|
MAJOR_VERSION = 0
|
||||||
MINOR_VERSION = 118
|
MINOR_VERSION = 118
|
||||||
PATCH_VERSION = "0"
|
PATCH_VERSION = "1"
|
||||||
__short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}"
|
__short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}"
|
||||||
__version__ = f"{__short_version__}.{PATCH_VERSION}"
|
__version__ = f"{__short_version__}.{PATCH_VERSION}"
|
||||||
REQUIRED_PYTHON_VER = (3, 7, 1)
|
REQUIRED_PYTHON_VER = (3, 7, 1)
|
||||||
|
@ -741,7 +741,7 @@ hass-nabucasa==0.37.2
|
|||||||
hass_splunk==0.1.1
|
hass_splunk==0.1.1
|
||||||
|
|
||||||
# homeassistant.components.tasmota
|
# homeassistant.components.tasmota
|
||||||
hatasmota==0.0.31
|
hatasmota==0.0.32
|
||||||
|
|
||||||
# homeassistant.components.jewish_calendar
|
# homeassistant.components.jewish_calendar
|
||||||
hdate==0.9.12
|
hdate==0.9.12
|
||||||
@ -1876,7 +1876,7 @@ pyversasense==0.0.6
|
|||||||
pyvesync==1.2.0
|
pyvesync==1.2.0
|
||||||
|
|
||||||
# homeassistant.components.vizio
|
# homeassistant.components.vizio
|
||||||
pyvizio==0.1.56
|
pyvizio==0.1.57
|
||||||
|
|
||||||
# homeassistant.components.velux
|
# homeassistant.components.velux
|
||||||
pyvlx==0.2.18
|
pyvlx==0.2.18
|
||||||
@ -2286,7 +2286,7 @@ withings-api==2.1.6
|
|||||||
wled==0.4.4
|
wled==0.4.4
|
||||||
|
|
||||||
# homeassistant.components.wolflink
|
# homeassistant.components.wolflink
|
||||||
wolf_smartset==0.1.6
|
wolf_smartset==0.1.8
|
||||||
|
|
||||||
# homeassistant.components.xbee
|
# homeassistant.components.xbee
|
||||||
xbee-helper==0.0.7
|
xbee-helper==0.0.7
|
||||||
|
@ -376,7 +376,7 @@ hangups==0.4.11
|
|||||||
hass-nabucasa==0.37.2
|
hass-nabucasa==0.37.2
|
||||||
|
|
||||||
# homeassistant.components.tasmota
|
# homeassistant.components.tasmota
|
||||||
hatasmota==0.0.31
|
hatasmota==0.0.32
|
||||||
|
|
||||||
# homeassistant.components.jewish_calendar
|
# homeassistant.components.jewish_calendar
|
||||||
hdate==0.9.12
|
hdate==0.9.12
|
||||||
@ -908,7 +908,7 @@ pyvera==0.3.11
|
|||||||
pyvesync==1.2.0
|
pyvesync==1.2.0
|
||||||
|
|
||||||
# homeassistant.components.vizio
|
# homeassistant.components.vizio
|
||||||
pyvizio==0.1.56
|
pyvizio==0.1.57
|
||||||
|
|
||||||
# homeassistant.components.volumio
|
# homeassistant.components.volumio
|
||||||
pyvolumio==0.1.3
|
pyvolumio==0.1.3
|
||||||
@ -1097,7 +1097,7 @@ withings-api==2.1.6
|
|||||||
wled==0.4.4
|
wled==0.4.4
|
||||||
|
|
||||||
# homeassistant.components.wolflink
|
# homeassistant.components.wolflink
|
||||||
wolf_smartset==0.1.6
|
wolf_smartset==0.1.8
|
||||||
|
|
||||||
# homeassistant.components.xbox
|
# homeassistant.components.xbox
|
||||||
xbox-webapi==2.0.8
|
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
|
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):
|
async def test_valid_discovery_message(hass, mqtt_mock, caplog):
|
||||||
"""Test discovery callback called."""
|
"""Test discovery callback called."""
|
||||||
config = copy.deepcopy(DEFAULT_CONFIG)
|
config = copy.deepcopy(DEFAULT_CONFIG)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user