diff --git a/homeassistant/components/asuswrt/bridge.py b/homeassistant/components/asuswrt/bridge.py index 53c19ede366a88..965f88ed5038ae 100644 --- a/homeassistant/components/asuswrt/bridge.py +++ b/homeassistant/components/asuswrt/bridge.py @@ -3,11 +3,10 @@ from __future__ import annotations from abc import ABC, abstractmethod -from collections import namedtuple from collections.abc import Awaitable, Callable, Coroutine import functools import logging -from typing import Any +from typing import Any, NamedTuple from aioasuswrt.asuswrt import AsusWrt as AsusWrtLegacy from aiohttp import ClientSession @@ -61,7 +60,14 @@ SENSORS_TYPE_TEMPERATURES = "sensors_temperatures" SENSORS_TYPE_UPTIME = "sensors_uptime" -WrtDevice = namedtuple("WrtDevice", ["ip", "name", "connected_to"]) # noqa: PYI024 + +class WrtDevice(NamedTuple): + """WrtDevice structure.""" + + ip: str | None + name: str | None + conneted_to: str | None + _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/foscam/manifest.json b/homeassistant/components/foscam/manifest.json index 0b1ae5cc6f2dfd..898537751f5857 100644 --- a/homeassistant/components/foscam/manifest.json +++ b/homeassistant/components/foscam/manifest.json @@ -6,5 +6,5 @@ "documentation": "https://www.home-assistant.io/integrations/foscam", "iot_class": "local_polling", "loggers": ["libpyfoscamcgi"], - "requirements": ["libpyfoscamcgi==0.0.7"] + "requirements": ["libpyfoscamcgi==0.0.8"] } diff --git a/homeassistant/components/mqtt/strings.json b/homeassistant/components/mqtt/strings.json index a6bd64cb8734d8..b7540e7159c693 100644 --- a/homeassistant/components/mqtt/strings.json +++ b/homeassistant/components/mqtt/strings.json @@ -412,7 +412,7 @@ "state_topic": "The MQTT topic subscribed to receive {platform} state values. [Learn more.]({url}#state_topic)", "step": "Step value. Smallest value 0.001.", "support_duration": "The siren supports setting a duration in second. The `duration` variable will become available for use in the \"Command template\" setting. [Learn more.]({url}#support_duration)", - "support_volume_set": "The siren supports setting a volume. The `tone` variable will become available for use in the \"Command template\" setting. [Learn more.]({url}#support_volume_set)", + "support_volume_set": "The siren supports setting a volume. The `volume_level` variable will become available for use in the \"Command template\" setting. [Learn more.]({url}#support_volume_set)", "supported_color_modes": "A list of color modes supported by the light. Possible color modes are On/Off, Brightness, Color temperature, HS, XY, RGB, RGBW, RGBWW, White. Note that if On/Off or Brightness are used, that must be the only value in the list. [Learn more.]({url}#supported_color_modes)", "url_template": "[Template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract an URL from the received URL topic payload value. [Learn more.]({url}#url_template)", "url_topic": "The MQTT topic subscribed to receive messages containing the image URL. [Learn more.]({url}#url_topic)", diff --git a/homeassistant/components/onewire/const.py b/homeassistant/components/onewire/const.py index 2db2bf973a20e7..7e4db9f94df17c 100644 --- a/homeassistant/components/onewire/const.py +++ b/homeassistant/components/onewire/const.py @@ -13,6 +13,7 @@ DEVICE_KEYS_A_D = ("A", "B", "C", "D") DEVICE_SUPPORT = { + "01": (), "05": (), "10": (), "12": (), diff --git a/homeassistant/components/onewire/onewirehub.py b/homeassistant/components/onewire/onewirehub.py index b03b2fa3c683ad..9175d9f21b48e7 100644 --- a/homeassistant/components/onewire/onewirehub.py +++ b/homeassistant/components/onewire/onewirehub.py @@ -144,7 +144,7 @@ async def _discover_devices( device_info = DeviceInfo( identifiers={(DOMAIN, device_id)}, manufacturer=DEVICE_MANUFACTURER.get(device_family, MANUFACTURER_MAXIM), - model=device_type, + model=None, # cleanup from #135279 model_id=device_type, name=device_id, serial_number=device_id[3:], diff --git a/homeassistant/components/onewire/select.py b/homeassistant/components/onewire/select.py index 7a33471dbe5a4b..b3b3e166c36342 100644 --- a/homeassistant/components/onewire/select.py +++ b/homeassistant/components/onewire/select.py @@ -40,6 +40,7 @@ class OneWireSelectEntityDescription(OneWireEntityDescription, SelectEntityDescr read_mode=READ_MODE_INT, options=["9", "10", "11", "12"], translation_key="tempres", + entity_registry_enabled_default=False, ), ), } diff --git a/homeassistant/components/system_bridge/coordinator.py b/homeassistant/components/system_bridge/coordinator.py index 7e545f39e461a5..f665c88121c70c 100644 --- a/homeassistant/components/system_bridge/coordinator.py +++ b/homeassistant/components/system_bridge/coordinator.py @@ -31,7 +31,7 @@ from homeassistant.core import HomeAssistant from homeassistant.exceptions import ConfigEntryAuthFailed from homeassistant.helpers.aiohttp_client import async_get_clientsession -from homeassistant.helpers.update_coordinator import DataUpdateCoordinator +from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed from .const import DOMAIN, GET_DATA_WAIT_TIMEOUT, MODULES from .data import SystemBridgeData @@ -198,7 +198,9 @@ async def _async_update_data(self) -> SystemBridgeData: exception, ) await self.clean_disconnect() - return self.data + raise UpdateFailed( + f"Connection error occurred for {self.title}: {exception}" + ) from exception self.logger.debug("Registered data listener for %s", self.title) diff --git a/homeassistant/components/velux/manifest.json b/homeassistant/components/velux/manifest.json index 11e939fdfe77b6..e6ab6089b7143a 100644 --- a/homeassistant/components/velux/manifest.json +++ b/homeassistant/components/velux/manifest.json @@ -10,6 +10,7 @@ } ], "documentation": "https://www.home-assistant.io/integrations/velux", + "integration_type": "hub", "iot_class": "local_polling", "loggers": ["pyvlx"], "requirements": ["pyvlx==0.2.26"] diff --git a/homeassistant/components/vera/config_flow.py b/homeassistant/components/vera/config_flow.py index f02549e7857d3b..dfc0914e32e550 100644 --- a/homeassistant/components/vera/config_flow.py +++ b/homeassistant/components/vera/config_flow.py @@ -90,6 +90,10 @@ async def async_step_init( return self.async_show_form( step_id="init", data_schema=vol.Schema(options_schema(self.config_entry.options)), + description_placeholders={ + "sample_ip": "http://192.168.1.161:3480", + "documentation_url": "https://www.home-assistant.io/integrations/vera/", + }, ) @@ -121,6 +125,10 @@ async def async_step_user( data_schema=vol.Schema( {vol.Required(CONF_CONTROLLER): str, **options_schema()} ), + description_placeholders={ + "sample_ip": "http://192.168.1.161:3480", + "documentation_url": "https://www.home-assistant.io/integrations/vera/", + }, ) async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: diff --git a/homeassistant/components/vera/strings.json b/homeassistant/components/vera/strings.json index dcb8f6fc3a2ffa..acb166d4f64c25 100644 --- a/homeassistant/components/vera/strings.json +++ b/homeassistant/components/vera/strings.json @@ -12,7 +12,7 @@ "exclude": "Vera device IDs to exclude from Home Assistant." }, "data_description": { - "vera_controller_url": "It should look like this: http://192.168.1.161:3480" + "vera_controller_url": "It should look like this: {sample_ip}" } } } @@ -21,7 +21,7 @@ "step": { "init": { "title": "Vera controller options", - "description": "See the Vera documentation for details on optional parameters: https://www.home-assistant.io/integrations/vera/. Note: Any changes here require a restart of the Home Assistant server. To clear values, provide a space.", + "description": "See the Vera documentation for details on optional parameters: {documentation_url}. Note: Any changes here require a restart of the Home Assistant server. To clear values, provide a space.", "data": { "lights": "[%key:component::vera::config::step::user::data::lights%]", "exclude": "[%key:component::vera::config::step::user::data::exclude%]" diff --git a/requirements_all.txt b/requirements_all.txt index 9c99e91f9863ac..4399edbfb8143a 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1361,7 +1361,7 @@ lektricowifi==0.1 letpot==0.6.2 # homeassistant.components.foscam -libpyfoscamcgi==0.0.7 +libpyfoscamcgi==0.0.8 # homeassistant.components.vivotek libpyvivotek==0.6.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 0dda1fdd1f6d61..67393aecea63cc 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1183,7 +1183,7 @@ lektricowifi==0.1 letpot==0.6.2 # homeassistant.components.foscam -libpyfoscamcgi==0.0.7 +libpyfoscamcgi==0.0.8 # homeassistant.components.libre_hardware_monitor librehardwaremonitor-api==1.4.0 diff --git a/tests/components/onewire/const.py b/tests/components/onewire/const.py index c113bd592ede80..2f58766f031ed3 100644 --- a/tests/components/onewire/const.py +++ b/tests/components/onewire/const.py @@ -11,6 +11,11 @@ "/type": [b""], }, }, + "01.111111111111": { + ATTR_INJECT_READS: { + "/type": [b"DS2401"], + }, + }, "05.111111111111": { ATTR_INJECT_READS: { "/type": [b"DS2405"], diff --git a/tests/components/onewire/snapshots/test_diagnostics.ambr b/tests/components/onewire/snapshots/test_diagnostics.ambr index c60d0a9748b60d..b65506e60b3d0e 100644 --- a/tests/components/onewire/snapshots/test_diagnostics.ambr +++ b/tests/components/onewire/snapshots/test_diagnostics.ambr @@ -11,7 +11,7 @@ ]), ]), 'manufacturer': 'Hobby Boards', - 'model': 'HB_HUB', + 'model': None, 'model_id': 'HB_HUB', 'name': 'EF.111111111113', 'serial_number': '111111111113', diff --git a/tests/components/onewire/snapshots/test_init.ambr b/tests/components/onewire/snapshots/test_init.ambr index b879541d4ca88d..19ac87204965b8 100644 --- a/tests/components/onewire/snapshots/test_init.ambr +++ b/tests/components/onewire/snapshots/test_init.ambr @@ -1,4 +1,35 @@ # serializer version: 1 +# name: test_registry[01.111111111111-entry] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': None, + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'onewire', + '01.111111111111', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Maxim Integrated', + 'model': None, + 'model_id': 'DS2401', + 'name': '01.111111111111', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': '111111111111', + 'sw_version': '3.2', + 'via_device_id': None, + }) +# --- # name: test_registry[05.111111111111-entry] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -20,7 +51,7 @@ 'labels': set({ }), 'manufacturer': 'Maxim Integrated', - 'model': 'DS2405', + 'model': None, 'model_id': 'DS2405', 'name': '05.111111111111', 'name_by_user': None, @@ -51,7 +82,7 @@ 'labels': set({ }), 'manufacturer': 'Maxim Integrated', - 'model': 'DS18S20', + 'model': None, 'model_id': 'DS18S20', 'name': '10.111111111111', 'name_by_user': None, @@ -82,7 +113,7 @@ 'labels': set({ }), 'manufacturer': 'Maxim Integrated', - 'model': 'DS2406', + 'model': None, 'model_id': 'DS2406', 'name': '12.111111111111', 'name_by_user': None, @@ -113,7 +144,7 @@ 'labels': set({ }), 'manufacturer': 'Maxim Integrated', - 'model': 'DS2423', + 'model': None, 'model_id': 'DS2423', 'name': '1D.111111111111', 'name_by_user': None, @@ -144,7 +175,7 @@ 'labels': set({ }), 'manufacturer': 'Maxim Integrated', - 'model': 'DS2409', + 'model': None, 'model_id': 'DS2409', 'name': '1F.111111111111', 'name_by_user': None, @@ -175,7 +206,7 @@ 'labels': set({ }), 'manufacturer': 'Maxim Integrated', - 'model': 'DS2450', + 'model': None, 'model_id': 'DS2450', 'name': '20.111111111111', 'name_by_user': None, @@ -206,7 +237,7 @@ 'labels': set({ }), 'manufacturer': 'Maxim Integrated', - 'model': 'DS1822', + 'model': None, 'model_id': 'DS1822', 'name': '22.111111111111', 'name_by_user': None, @@ -237,7 +268,7 @@ 'labels': set({ }), 'manufacturer': 'Maxim Integrated', - 'model': 'DS2438', + 'model': None, 'model_id': 'DS2438', 'name': '26.111111111111', 'name_by_user': None, @@ -268,7 +299,7 @@ 'labels': set({ }), 'manufacturer': 'Maxim Integrated', - 'model': 'DS18B20', + 'model': None, 'model_id': 'DS18B20', 'name': '28.111111111111', 'name_by_user': None, @@ -299,7 +330,7 @@ 'labels': set({ }), 'manufacturer': 'Maxim Integrated', - 'model': 'DS18B20', + 'model': None, 'model_id': 'DS18B20', 'name': '28.222222222222', 'name_by_user': None, @@ -330,7 +361,7 @@ 'labels': set({ }), 'manufacturer': 'Maxim Integrated', - 'model': 'DS18B20', + 'model': None, 'model_id': 'DS18B20', 'name': '28.222222222223', 'name_by_user': None, @@ -361,7 +392,7 @@ 'labels': set({ }), 'manufacturer': 'Maxim Integrated', - 'model': 'DS2408', + 'model': None, 'model_id': 'DS2408', 'name': '29.111111111111', 'name_by_user': None, @@ -392,7 +423,7 @@ 'labels': set({ }), 'manufacturer': 'Maxim Integrated', - 'model': 'DS2760', + 'model': None, 'model_id': 'DS2760', 'name': '30.111111111111', 'name_by_user': None, @@ -423,7 +454,7 @@ 'labels': set({ }), 'manufacturer': 'Maxim Integrated', - 'model': 'DS2413', + 'model': None, 'model_id': 'DS2413', 'name': '3A.111111111111', 'name_by_user': None, @@ -454,7 +485,7 @@ 'labels': set({ }), 'manufacturer': 'Maxim Integrated', - 'model': 'DS1825', + 'model': None, 'model_id': 'DS1825', 'name': '3B.111111111111', 'name_by_user': None, @@ -485,7 +516,7 @@ 'labels': set({ }), 'manufacturer': 'Maxim Integrated', - 'model': 'DS28EA00', + 'model': None, 'model_id': 'DS28EA00', 'name': '42.111111111111', 'name_by_user': None, @@ -516,7 +547,7 @@ 'labels': set({ }), 'manufacturer': 'Embedded Data Systems', - 'model': 'EDS0068', + 'model': None, 'model_id': 'EDS0068', 'name': '7E.111111111111', 'name_by_user': None, @@ -547,7 +578,7 @@ 'labels': set({ }), 'manufacturer': 'Embedded Data Systems', - 'model': 'EDS0066', + 'model': None, 'model_id': 'EDS0066', 'name': '7E.222222222222', 'name_by_user': None, @@ -578,7 +609,7 @@ 'labels': set({ }), 'manufacturer': 'Maxim Integrated', - 'model': 'DS2438', + 'model': None, 'model_id': 'DS2438', 'name': 'A6.111111111111', 'name_by_user': None, @@ -609,7 +640,7 @@ 'labels': set({ }), 'manufacturer': 'Hobby Boards', - 'model': 'HobbyBoards_EF', + 'model': None, 'model_id': 'HobbyBoards_EF', 'name': 'EF.111111111111', 'name_by_user': None, @@ -640,7 +671,7 @@ 'labels': set({ }), 'manufacturer': 'Hobby Boards', - 'model': 'HB_MOISTURE_METER', + 'model': None, 'model_id': 'HB_MOISTURE_METER', 'name': 'EF.111111111112', 'name_by_user': None, @@ -671,7 +702,7 @@ 'labels': set({ }), 'manufacturer': 'Hobby Boards', - 'model': 'HB_HUB', + 'model': None, 'model_id': 'HB_HUB', 'name': 'EF.111111111113', 'name_by_user': None, diff --git a/tests/components/onewire/test_select.py b/tests/components/onewire/test_select.py index 6e1c3277c73a71..495366bd8b0c89 100644 --- a/tests/components/onewire/test_select.py +++ b/tests/components/onewire/test_select.py @@ -72,6 +72,7 @@ async def test_selects_delayed( @pytest.mark.parametrize("device_id", ["28.111111111111"]) +@pytest.mark.usefixtures("entity_registry_enabled_by_default") async def test_selection_option_service( hass: HomeAssistant, config_entry: MockConfigEntry,