diff --git a/homeassistant/components/daikin/manifest.json b/homeassistant/components/daikin/manifest.json index 28bfec14760..0657f597a5d 100644 --- a/homeassistant/components/daikin/manifest.json +++ b/homeassistant/components/daikin/manifest.json @@ -3,7 +3,7 @@ "name": "Daikin AC", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/daikin", - "requirements": ["pydaikin==2.7.0"], + "requirements": ["pydaikin==2.7.2"], "codeowners": ["@fredrike"], "zeroconf": ["_dkapi._tcp.local."], "quality_scale": "platinum", diff --git a/homeassistant/components/device_automation/action.py b/homeassistant/components/device_automation/action.py index 432ff2fdb7d..081b6bb283a 100644 --- a/homeassistant/components/device_automation/action.py +++ b/homeassistant/components/device_automation/action.py @@ -7,7 +7,6 @@ import voluptuous as vol from homeassistant.const import CONF_DOMAIN from homeassistant.core import Context, HomeAssistant -from homeassistant.helpers import config_validation as cv from homeassistant.helpers.typing import ConfigType from . import DeviceAutomationType, async_get_device_automation_platform @@ -52,15 +51,14 @@ async def async_validate_action_config( ) -> ConfigType: """Validate config.""" try: - config = cv.DEVICE_ACTION_SCHEMA(config) platform = await async_get_device_automation_platform( hass, config[CONF_DOMAIN], DeviceAutomationType.ACTION ) if hasattr(platform, "async_validate_action_config"): return await platform.async_validate_action_config(hass, config) return cast(ConfigType, platform.ACTION_SCHEMA(config)) - except (vol.Invalid, InvalidDeviceAutomationConfig) as err: - raise vol.Invalid("invalid action configuration: " + str(err)) from err + except InvalidDeviceAutomationConfig as err: + raise vol.Invalid(str(err) or "Invalid action configuration") from err async def async_call_action_from_config( diff --git a/homeassistant/components/device_automation/condition.py b/homeassistant/components/device_automation/condition.py index 3b0a5263f9e..d656908f4be 100644 --- a/homeassistant/components/device_automation/condition.py +++ b/homeassistant/components/device_automation/condition.py @@ -58,8 +58,8 @@ async def async_validate_condition_config( if hasattr(platform, "async_validate_condition_config"): return await platform.async_validate_condition_config(hass, config) return cast(ConfigType, platform.CONDITION_SCHEMA(config)) - except (vol.Invalid, InvalidDeviceAutomationConfig) as err: - raise vol.Invalid("invalid condition configuration: " + str(err)) from err + except InvalidDeviceAutomationConfig as err: + raise vol.Invalid(str(err) or "Invalid condition configuration") from err async def async_condition_from_config( diff --git a/homeassistant/components/device_automation/trigger.py b/homeassistant/components/device_automation/trigger.py index aac56b39846..bd72b24d844 100644 --- a/homeassistant/components/device_automation/trigger.py +++ b/homeassistant/components/device_automation/trigger.py @@ -58,15 +58,14 @@ async def async_validate_trigger_config( ) -> ConfigType: """Validate config.""" try: - config = TRIGGER_SCHEMA(config) platform = await async_get_device_automation_platform( hass, config[CONF_DOMAIN], DeviceAutomationType.TRIGGER ) if not hasattr(platform, "async_validate_trigger_config"): return cast(ConfigType, platform.TRIGGER_SCHEMA(config)) return await platform.async_validate_trigger_config(hass, config) - except (vol.Invalid, InvalidDeviceAutomationConfig) as err: - raise InvalidDeviceAutomationConfig("invalid trigger configuration") from err + except InvalidDeviceAutomationConfig as err: + raise vol.Invalid(str(err) or "Invalid trigger configuration") from err async def async_attach_trigger( diff --git a/homeassistant/components/esphome/bluetooth/__init__.py b/homeassistant/components/esphome/bluetooth/__init__.py index 4f3235676a4..b4d5fdbd04d 100644 --- a/homeassistant/components/esphome/bluetooth/__init__.py +++ b/homeassistant/components/esphome/bluetooth/__init__.py @@ -1,6 +1,7 @@ """Bluetooth support for esphome.""" from __future__ import annotations +from collections.abc import Callable import logging from aioesphomeapi import APIClient @@ -11,14 +12,8 @@ from homeassistant.components.bluetooth import ( async_register_scanner, ) from homeassistant.config_entries import ConfigEntry -from homeassistant.core import ( - CALLBACK_TYPE, - HomeAssistant, - async_get_hass, - callback as hass_callback, -) +from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback as hass_callback -from ..domain_data import DomainData from ..entry_data import RuntimeEntryData from .client import ESPHomeClient from .scanner import ESPHomeScanner @@ -27,18 +22,23 @@ _LOGGER = logging.getLogger(__name__) @hass_callback -def async_can_connect(source: str) -> bool: - """Check if a given source can make another connection.""" - domain_data = DomainData.get(async_get_hass()) - entry = domain_data.get_by_unique_id(source) - entry_data = domain_data.get_entry_data(entry) - _LOGGER.debug( - "Checking if %s can connect, available=%s, ble_connections_free=%s", - source, - entry_data.available, - entry_data.ble_connections_free, - ) - return bool(entry_data.available and entry_data.ble_connections_free) +def _async_can_connect_factory( + entry_data: RuntimeEntryData, source: str +) -> Callable[[], bool]: + """Create a can_connect function for a specific RuntimeEntryData instance.""" + + @hass_callback + def _async_can_connect() -> bool: + """Check if a given source can make another connection.""" + _LOGGER.debug( + "Checking if %s can connect, available=%s, ble_connections_free=%s", + source, + entry_data.available, + entry_data.ble_connections_free, + ) + return bool(entry_data.available and entry_data.ble_connections_free) + + return _async_can_connect async def async_connect_scanner( @@ -63,7 +63,7 @@ async def async_connect_scanner( connector = HaBluetoothConnector( client=ESPHomeClient, source=source, - can_connect=lambda: async_can_connect(source), + can_connect=_async_can_connect_factory(entry_data, source), ) scanner = ESPHomeScanner(hass, source, new_info_callback, connector, connectable) unload_callbacks = [ diff --git a/homeassistant/components/hvv_departures/sensor.py b/homeassistant/components/hvv_departures/sensor.py index 0a516529386..e2de1758dd5 100644 --- a/homeassistant/components/hvv_departures/sensor.py +++ b/homeassistant/components/hvv_departures/sensor.py @@ -16,7 +16,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.util import Throttle from homeassistant.util.dt import get_time_zone, utcnow -from .const import ATTRIBUTION, CONF_STATION, DOMAIN, MANUFACTURER +from .const import ATTRIBUTION, CONF_REAL_TIME, CONF_STATION, DOMAIN, MANUFACTURER MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=1) MAX_LIST = 20 @@ -90,7 +90,7 @@ class HVVDepartureSensor(SensorEntity): }, "maxList": MAX_LIST, "maxTimeOffset": MAX_TIME_OFFSET, - "useRealtime": self.config_entry.options.get("realtime", False), + "useRealtime": self.config_entry.options.get(CONF_REAL_TIME, False), } if "filter" in self.config_entry.options: diff --git a/homeassistant/components/keymitt_ble/manifest.json b/homeassistant/components/keymitt_ble/manifest.json index 445a2581bda..2a21074bb12 100644 --- a/homeassistant/components/keymitt_ble/manifest.json +++ b/homeassistant/components/keymitt_ble/manifest.json @@ -5,17 +5,14 @@ "config_flow": true, "bluetooth": [ { - "service_uuid": "00001831-0000-1000-8000-00805f9b34fb" - }, - { - "service_data_uuid": "00001831-0000-1000-8000-00805f9b34fb" + "service_uuid": "0000abcd-0000-1000-8000-00805f9b34fb" }, { "local_name": "mib*" } ], "codeowners": ["@spycle"], - "requirements": ["PyMicroBot==0.0.6"], + "requirements": ["PyMicroBot==0.0.8"], "iot_class": "assumed_state", "dependencies": ["bluetooth"], "loggers": ["keymitt_ble"] diff --git a/homeassistant/components/london_underground/sensor.py b/homeassistant/components/london_underground/sensor.py index 96ff9bc5056..b111fb8be6c 100644 --- a/homeassistant/components/london_underground/sensor.py +++ b/homeassistant/components/london_underground/sensor.py @@ -39,13 +39,13 @@ TUBE_LINES = [ "Circle", "District", "DLR", + "Elizabeth line", "Hammersmith & City", "Jubilee", "London Overground", "Metropolitan", "Northern", "Piccadilly", - "TfL Rail", "Victoria", "Waterloo & City", ] diff --git a/homeassistant/components/mqtt/discovery.py b/homeassistant/components/mqtt/discovery.py index 23453e146ed..92ad50b7b4a 100644 --- a/homeassistant/components/mqtt/discovery.py +++ b/homeassistant/components/mqtt/discovery.py @@ -139,6 +139,14 @@ async def async_start( # noqa: C901 key = DEVICE_ABBREVIATIONS.get(key, key) device[key] = device.pop(abbreviated_key) + if CONF_AVAILABILITY in payload: + for availability_conf in cv.ensure_list(payload[CONF_AVAILABILITY]): + if isinstance(availability_conf, dict): + for key in list(availability_conf): + abbreviated_key = key + key = ABBREVIATIONS.get(key, key) + availability_conf[key] = availability_conf.pop(abbreviated_key) + if TOPIC_BASE in payload: base = payload.pop(TOPIC_BASE) for key, value in payload.items(): diff --git a/homeassistant/components/netatmo/manifest.json b/homeassistant/components/netatmo/manifest.json index 74d34056241..1e3354f1c27 100644 --- a/homeassistant/components/netatmo/manifest.json +++ b/homeassistant/components/netatmo/manifest.json @@ -2,7 +2,7 @@ "domain": "netatmo", "name": "Netatmo", "documentation": "https://www.home-assistant.io/integrations/netatmo", - "requirements": ["pyatmo==7.1.0"], + "requirements": ["pyatmo==7.1.1"], "after_dependencies": ["cloud", "media_source"], "dependencies": ["application_credentials", "webhook"], "codeowners": ["@cgtobi"], diff --git a/homeassistant/components/nibe_heatpump/config_flow.py b/homeassistant/components/nibe_heatpump/config_flow.py index 28fafdb3a37..412b44d69a1 100644 --- a/homeassistant/components/nibe_heatpump/config_flow.py +++ b/homeassistant/components/nibe_heatpump/config_flow.py @@ -29,7 +29,7 @@ from .const import ( STEP_USER_DATA_SCHEMA = vol.Schema( { - vol.Required(CONF_MODEL): vol.In([e.name for e in Model]), + vol.Required(CONF_MODEL): vol.In(list(Model.__members__)), vol.Required(CONF_IP_ADDRESS): str, vol.Required(CONF_LISTENING_PORT): cv.port, vol.Required(CONF_REMOTE_READ_PORT): cv.port, diff --git a/homeassistant/components/overkiz/manifest.json b/homeassistant/components/overkiz/manifest.json index 0b3e041f302..480b0b1d9ed 100644 --- a/homeassistant/components/overkiz/manifest.json +++ b/homeassistant/components/overkiz/manifest.json @@ -3,7 +3,7 @@ "name": "Overkiz", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/overkiz", - "requirements": ["pyoverkiz==1.5.3"], + "requirements": ["pyoverkiz==1.5.5"], "zeroconf": [ { "type": "_kizbox._tcp.local.", diff --git a/homeassistant/components/rfxtrx/device_action.py b/homeassistant/components/rfxtrx/device_action.py index 7ea4ed07423..15595b88cd2 100644 --- a/homeassistant/components/rfxtrx/device_action.py +++ b/homeassistant/components/rfxtrx/device_action.py @@ -80,6 +80,7 @@ async def async_validate_action_config( hass: HomeAssistant, config: ConfigType ) -> ConfigType: """Validate config.""" + config = ACTION_SCHEMA(config) commands, _ = _get_commands(hass, config[CONF_DEVICE_ID], config[CONF_TYPE]) sub_type = config[CONF_SUBTYPE] diff --git a/homeassistant/components/sonos/speaker.py b/homeassistant/components/sonos/speaker.py index 98984eedc03..38d37e7cfd4 100644 --- a/homeassistant/components/sonos/speaker.py +++ b/homeassistant/components/sonos/speaker.py @@ -489,7 +489,10 @@ class SonosSpeaker: return if crossfade := event.variables.get("current_crossfade_mode"): - self.cross_fade = bool(int(crossfade)) + crossfade = bool(int(crossfade)) + if self.cross_fade != crossfade: + self.cross_fade = crossfade + self.async_write_entity_states() # Missing transport_state indicates a transient error if (new_status := event.variables.get("transport_state")) is None: diff --git a/homeassistant/components/unifi/manifest.json b/homeassistant/components/unifi/manifest.json index 6bf9f8aa473..eeb974242e9 100644 --- a/homeassistant/components/unifi/manifest.json +++ b/homeassistant/components/unifi/manifest.json @@ -3,7 +3,7 @@ "name": "UniFi Network", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/unifi", - "requirements": ["aiounifi==37"], + "requirements": ["aiounifi==38"], "codeowners": ["@Kane610"], "quality_scale": "platinum", "ssdp": [ diff --git a/homeassistant/components/zha/manifest.json b/homeassistant/components/zha/manifest.json index 803a7daabbe..426ac24bbe3 100644 --- a/homeassistant/components/zha/manifest.json +++ b/homeassistant/components/zha/manifest.json @@ -4,15 +4,15 @@ "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/zha", "requirements": [ - "bellows==0.34.1", + "bellows==0.34.2", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.82", "zigpy-deconz==0.19.0", - "zigpy==0.51.2", - "zigpy-xbee==0.16.0", - "zigpy-zigate==0.10.0", - "zigpy-znp==0.9.0" + "zigpy==0.51.3", + "zigpy-xbee==0.16.1", + "zigpy-zigate==0.10.1", + "zigpy-znp==0.9.1" ], "usb": [ { diff --git a/homeassistant/const.py b/homeassistant/const.py index cb7eb689b2d..588cd972966 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -8,7 +8,7 @@ from .backports.enum import StrEnum APPLICATION_NAME: Final = "HomeAssistant" MAJOR_VERSION: Final = 2022 MINOR_VERSION: Final = 10 -PATCH_VERSION: Final = "1" +PATCH_VERSION: Final = "2" __short_version__: Final = f"{MAJOR_VERSION}.{MINOR_VERSION}" __version__: Final = f"{__short_version__}.{PATCH_VERSION}" REQUIRED_PYTHON_VER: Final[tuple[int, int, int]] = (3, 9, 0) diff --git a/homeassistant/generated/bluetooth.py b/homeassistant/generated/bluetooth.py index 8975ac66611..181a4034bf0 100644 --- a/homeassistant/generated/bluetooth.py +++ b/homeassistant/generated/bluetooth.py @@ -173,11 +173,7 @@ BLUETOOTH: list[dict[str, bool | str | int | list[int]]] = [ }, { "domain": "keymitt_ble", - "service_uuid": "00001831-0000-1000-8000-00805f9b34fb", - }, - { - "domain": "keymitt_ble", - "service_data_uuid": "00001831-0000-1000-8000-00805f9b34fb", + "service_uuid": "0000abcd-0000-1000-8000-00805f9b34fb", }, { "domain": "keymitt_ble", diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index f493034171f..92b535f0d6f 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -38,7 +38,7 @@ pyyaml==6.0 requests==2.28.1 scapy==2.4.5 sqlalchemy==1.4.41 -typing-extensions>=3.10.0.2,<5.0 +typing-extensions>=4.4.0,<5.0 voluptuous-serialize==2.5.0 voluptuous==0.13.1 yarl==1.8.1 diff --git a/pyproject.toml b/pyproject.toml index 287e1c6d627..cb32075133e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "homeassistant" -version = "2022.10.1" +version = "2022.10.2" license = {text = "Apache-2.0"} description = "Open-source home automation platform running on Python 3." readme = "README.rst" @@ -48,7 +48,7 @@ dependencies = [ "python-slugify==4.0.1", "pyyaml==6.0", "requests==2.28.1", - "typing-extensions>=3.10.0.2,<5.0", + "typing-extensions>=4.4.0,<5.0", "voluptuous==0.13.1", "voluptuous-serialize==2.5.0", "yarl==1.8.1", diff --git a/requirements.txt b/requirements.txt index 28d3c11081b..0dfc353823a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,7 +22,7 @@ pip>=21.0,<22.3 python-slugify==4.0.1 pyyaml==6.0 requests==2.28.1 -typing-extensions>=3.10.0.2,<5.0 +typing-extensions>=4.4.0,<5.0 voluptuous==0.13.1 voluptuous-serialize==2.5.0 yarl==1.8.1 diff --git a/requirements_all.txt b/requirements_all.txt index caf9c2209bb..921f36cc597 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -23,7 +23,7 @@ PyFlick==0.0.2 PyMVGLive==1.1.4 # homeassistant.components.keymitt_ble -PyMicroBot==0.0.6 +PyMicroBot==0.0.8 # homeassistant.components.mobile_app # homeassistant.components.owntracks @@ -276,7 +276,7 @@ aiosyncthing==0.5.1 aiotractive==0.5.4 # homeassistant.components.unifi -aiounifi==37 +aiounifi==38 # homeassistant.components.vlc_telnet aiovlc==0.1.0 @@ -401,7 +401,7 @@ beautifulsoup4==4.11.1 # beewi_smartclim==0.0.10 # homeassistant.components.zha -bellows==0.34.1 +bellows==0.34.2 # homeassistant.components.bmw_connected_drive bimmer_connected==0.10.4 @@ -1436,7 +1436,7 @@ pyalmond==0.0.2 pyatag==0.3.5.3 # homeassistant.components.netatmo -pyatmo==7.1.0 +pyatmo==7.1.1 # homeassistant.components.atome pyatome==0.1.1 @@ -1499,7 +1499,7 @@ pycsspeechtts==1.0.4 # pycups==1.9.73 # homeassistant.components.daikin -pydaikin==2.7.0 +pydaikin==2.7.2 # homeassistant.components.danfoss_air pydanfossair==0.1.0 @@ -1783,7 +1783,7 @@ pyotgw==2.0.3 pyotp==2.7.0 # homeassistant.components.overkiz -pyoverkiz==1.5.3 +pyoverkiz==1.5.5 # homeassistant.components.openweathermap pyowm==3.2.0 @@ -2604,16 +2604,16 @@ ziggo-mediabox-xl==1.1.0 zigpy-deconz==0.19.0 # homeassistant.components.zha -zigpy-xbee==0.16.0 +zigpy-xbee==0.16.1 # homeassistant.components.zha -zigpy-zigate==0.10.0 +zigpy-zigate==0.10.1 # homeassistant.components.zha -zigpy-znp==0.9.0 +zigpy-znp==0.9.1 # homeassistant.components.zha -zigpy==0.51.2 +zigpy==0.51.3 # homeassistant.components.zoneminder zm-py==0.5.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 33927e272e1..8112bef68b0 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -19,7 +19,7 @@ HAP-python==4.5.0 PyFlick==0.0.2 # homeassistant.components.keymitt_ble -PyMicroBot==0.0.6 +PyMicroBot==0.0.8 # homeassistant.components.mobile_app # homeassistant.components.owntracks @@ -251,7 +251,7 @@ aiosyncthing==0.5.1 aiotractive==0.5.4 # homeassistant.components.unifi -aiounifi==37 +aiounifi==38 # homeassistant.components.vlc_telnet aiovlc==0.1.0 @@ -328,7 +328,7 @@ base36==0.1.1 beautifulsoup4==4.11.1 # homeassistant.components.zha -bellows==0.34.1 +bellows==0.34.2 # homeassistant.components.bmw_connected_drive bimmer_connected==0.10.4 @@ -1024,7 +1024,7 @@ pyalmond==0.0.2 pyatag==0.3.5.3 # homeassistant.components.netatmo -pyatmo==7.1.0 +pyatmo==7.1.1 # homeassistant.components.apple_tv pyatv==0.10.3 @@ -1057,7 +1057,7 @@ pycomfoconnect==0.4 pycoolmasternet-async==0.1.2 # homeassistant.components.daikin -pydaikin==2.7.0 +pydaikin==2.7.2 # homeassistant.components.deconz pydeconz==104 @@ -1260,7 +1260,7 @@ pyotgw==2.0.3 pyotp==2.7.0 # homeassistant.components.overkiz -pyoverkiz==1.5.3 +pyoverkiz==1.5.5 # homeassistant.components.openweathermap pyowm==3.2.0 @@ -1799,16 +1799,16 @@ zha-quirks==0.0.82 zigpy-deconz==0.19.0 # homeassistant.components.zha -zigpy-xbee==0.16.0 +zigpy-xbee==0.16.1 # homeassistant.components.zha -zigpy-zigate==0.10.0 +zigpy-zigate==0.10.1 # homeassistant.components.zha -zigpy-znp==0.9.0 +zigpy-znp==0.9.1 # homeassistant.components.zha -zigpy==0.51.2 +zigpy==0.51.3 # homeassistant.components.zwave_js zwave-js-server-python==0.43.0 diff --git a/tests/components/device_automation/test_init.py b/tests/components/device_automation/test_init.py index 71c062cf7d9..3ead6fcb35d 100644 --- a/tests/components/device_automation/test_init.py +++ b/tests/components/device_automation/test_init.py @@ -720,28 +720,7 @@ async def test_automation_with_bad_condition_action(hass, caplog): assert "required key not provided" in caplog.text -async def test_automation_with_bad_condition_missing_domain(hass, caplog): - """Test automation with bad device condition.""" - assert await async_setup_component( - hass, - automation.DOMAIN, - { - automation.DOMAIN: { - "alias": "hello", - "trigger": {"platform": "event", "event_type": "test_event1"}, - "condition": {"condition": "device", "device_id": "hello.device"}, - "action": {"service": "test.automation", "entity_id": "hello.world"}, - } - }, - ) - - assert ( - "Invalid config for [automation]: required key not provided @ data['condition'][0]['domain']" - in caplog.text - ) - - -async def test_automation_with_bad_condition_missing_device_id(hass, caplog): +async def test_automation_with_bad_condition(hass, caplog): """Test automation with bad device condition.""" assert await async_setup_component( hass, @@ -756,10 +735,7 @@ async def test_automation_with_bad_condition_missing_device_id(hass, caplog): }, ) - assert ( - "Invalid config for [automation]: required key not provided @ data['condition'][0]['device_id']" - in caplog.text - ) + assert "required key not provided" in caplog.text @pytest.fixture @@ -900,25 +876,8 @@ async def test_automation_with_bad_sub_condition(hass, caplog): assert "required key not provided" in caplog.text -async def test_automation_with_bad_trigger_missing_domain(hass, caplog): - """Test automation with device trigger this is missing domain.""" - assert await async_setup_component( - hass, - automation.DOMAIN, - { - automation.DOMAIN: { - "alias": "hello", - "trigger": {"platform": "device", "device_id": "hello.device"}, - "action": {"service": "test.automation", "entity_id": "hello.world"}, - } - }, - ) - - assert "required key not provided @ data['domain']" in caplog.text - - -async def test_automation_with_bad_trigger_missing_device_id(hass, caplog): - """Test automation with device trigger that is missing device_id.""" +async def test_automation_with_bad_trigger(hass, caplog): + """Test automation with bad device trigger.""" assert await async_setup_component( hass, automation.DOMAIN, @@ -931,7 +890,7 @@ async def test_automation_with_bad_trigger_missing_device_id(hass, caplog): }, ) - assert "required key not provided @ data['device_id']" in caplog.text + assert "required key not provided" in caplog.text async def test_websocket_device_not_found(hass, hass_ws_client): diff --git a/tests/components/keymitt_ble/__init__.py b/tests/components/keymitt_ble/__init__.py index 0b145970643..7ae4c20c406 100644 --- a/tests/components/keymitt_ble/__init__.py +++ b/tests/components/keymitt_ble/__init__.py @@ -32,7 +32,7 @@ def patch_async_setup_entry(return_value=True): SERVICE_INFO = BluetoothServiceInfoBleak( name="mibp", - service_uuids=["00001831-0000-1000-8000-00805f9b34fb"], + service_uuids=["0000abcd-0000-1000-8000-00805f9b34fb"], address="aa:bb:cc:dd:ee:ff", manufacturer_data={}, service_data={}, @@ -41,7 +41,7 @@ SERVICE_INFO = BluetoothServiceInfoBleak( advertisement=AdvertisementData( local_name="mibp", manufacturer_data={}, - service_uuids=["00001831-0000-1000-8000-00805f9b34fb"], + service_uuids=["0000abcd-0000-1000-8000-00805f9b34fb"], ), device=BLEDevice("aa:bb:cc:dd:ee:ff", "mibp"), time=0, diff --git a/tests/components/mqtt/test_discovery.py b/tests/components/mqtt/test_discovery.py index 50c0a50bd40..77d7093830e 100644 --- a/tests/components/mqtt/test_discovery.py +++ b/tests/components/mqtt/test_discovery.py @@ -945,9 +945,9 @@ async def test_discovery_expansion(hass, mqtt_mock_entry_no_yaml_config, caplog) ' "payload_not_available": "not_available"' " }," " {" - ' "topic":"avail_item2/~",' - ' "payload_available": "available",' - ' "payload_not_available": "not_available"' + ' "t":"avail_item2/~",' + ' "pl_avail": "available",' + ' "pl_not_avail": "not_available"' " }" " ]," ' "dev":{' @@ -999,9 +999,9 @@ async def test_discovery_expansion_2(hass, mqtt_mock_entry_no_yaml_config, caplo ' "stat_t": "test_topic/~",' ' "cmd_t": "~/test_topic",' ' "availability": {' - ' "topic":"~/avail_item1",' - ' "payload_available": "available",' - ' "payload_not_available": "not_available"' + ' "t":"~/avail_item1",' + ' "pl_avail": "available",' + ' "pl_not_avail": "not_available"' " }," ' "dev":{' ' "ids":["5706DF"],' diff --git a/tests/components/webostv/test_device_trigger.py b/tests/components/webostv/test_device_trigger.py index 96914885971..db15ce3a592 100644 --- a/tests/components/webostv/test_device_trigger.py +++ b/tests/components/webostv/test_device_trigger.py @@ -128,7 +128,8 @@ async def test_get_triggers_for_invalid_device_id(hass, caplog): await hass.async_block_till_done() assert ( - "Invalid config for [automation]: invalid trigger configuration" in caplog.text + "Invalid config for [automation]: Device invalid_device_id is not a valid webostv device" + in caplog.text )