From 59d6eaf856a3b91315bf8f315418af62477753cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Kr=C3=B3l?= Date: Thu, 19 Nov 2020 15:24:28 +0100 Subject: [PATCH 1/6] Bump wolf_smartset to 0.1.8 and handle server fetch error (#43351) --- homeassistant/components/wolflink/__init__.py | 6 +++++- homeassistant/components/wolflink/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/wolflink/__init__.py b/homeassistant/components/wolflink/__init__.py index 611fa7da315..d04cd7a56d4 100644 --- a/homeassistant/components/wolflink/__init__.py +++ b/homeassistant/components/wolflink/__init__.py @@ -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 diff --git a/homeassistant/components/wolflink/manifest.json b/homeassistant/components/wolflink/manifest.json index 633318f2f62..6d038d4fb29 100644 --- a/homeassistant/components/wolflink/manifest.json +++ b/homeassistant/components/wolflink/manifest.json @@ -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"] } diff --git a/requirements_all.txt b/requirements_all.txt index aaa443263bf..15fc7c31f55 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -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 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 4841444b7a0..1d87caff053 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -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 From 18fdf3a42908bc80c2c227fe827ea5d5f262b277 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Thu, 19 Nov 2020 09:07:35 +0100 Subject: [PATCH 2/6] Bump hatasmota to 0.0.32 (#43360) --- .../components/tasmota/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- tests/components/tasmota/test_discovery.py | 19 +++++++++++++++++++ 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/tasmota/manifest.json b/homeassistant/components/tasmota/manifest.json index c270be6e633..6140de6025a 100644 --- a/homeassistant/components/tasmota/manifest.json +++ b/homeassistant/components/tasmota/manifest.json @@ -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"] diff --git a/requirements_all.txt b/requirements_all.txt index 15fc7c31f55..cb6921144d4 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -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 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 1d87caff053..0686e049d61 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -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 diff --git a/tests/components/tasmota/test_discovery.py b/tests/components/tasmota/test_discovery.py index b6a51a38daf..40fecb6b695 100644 --- a/tests/components/tasmota/test_discovery.py +++ b/tests/components/tasmota/test_discovery.py @@ -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) From e15f3b7b8e9e1f981cf72e3dde7bd4019fad6a5e Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 19 Nov 2020 01:10:23 -1000 Subject: [PATCH 3/6] Fix homekit bridges when no name was provided (#43364) --- homeassistant/components/homekit/__init__.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/homekit/__init__.py b/homeassistant/components/homekit/__init__.py index 2a0638642ed..1155d3ef18e 100644 --- a/homeassistant/components/homekit/__init__.py +++ b/homeassistant/components/homekit/__init__.py @@ -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) From 0bfcfb859a0e89251a0a54891be5c2d56764fc94 Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Thu, 19 Nov 2020 02:46:20 -0500 Subject: [PATCH 4/6] Bump pyvizio to 0.1.57 (#43374) --- homeassistant/components/vizio/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/vizio/manifest.json b/homeassistant/components/vizio/manifest.json index 7aa544b4a0b..9e4bd712e0f 100644 --- a/homeassistant/components/vizio/manifest.json +++ b/homeassistant/components/vizio/manifest.json @@ -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."], diff --git a/requirements_all.txt b/requirements_all.txt index cb6921144d4..cb8235a01cf 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -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 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 0686e049d61..45f37f2b18c 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -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 From 044edd3d9e6d14b8394a881fdb6389923e73545a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Thu, 19 Nov 2020 11:55:21 +0100 Subject: [PATCH 5/6] Add back system_health_info to the base of lovelace (#43382) --- homeassistant/components/lovelace/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/components/lovelace/__init__.py b/homeassistant/components/lovelace/__init__.py index 000c86567ca..7d0fe6574b9 100644 --- a/homeassistant/components/lovelace/__init__.py +++ b/homeassistant/components/lovelace/__init__.py @@ -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__) From 2741362b23a35e3806384882b61374af1e591957 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 19 Nov 2020 17:13:54 +0000 Subject: [PATCH 6/6] Bumped version to 0.118.1 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 9bcd046c7e6..8d520a15e6c 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -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)