From 1e6b6fef7e898119e66a4b7ee060469180f9a621 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Fri, 6 Sep 2024 15:42:56 +0200 Subject: [PATCH] Revert #122676 Yamaha discovery (#125216) Revert Yamaha discovery --- .../components/yamaha/media_player.py | 30 +------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/homeassistant/components/yamaha/media_player.py b/homeassistant/components/yamaha/media_player.py index 58f501b99be..bccb7b437f8 100644 --- a/homeassistant/components/yamaha/media_player.py +++ b/homeassistant/components/yamaha/media_player.py @@ -2,7 +2,6 @@ from __future__ import annotations -import contextlib import logging from typing import Any @@ -130,34 +129,7 @@ def _discovery(config_info): zones.extend(recv.zone_controllers()) else: _LOGGER.debug("Config Zones") - zones = None - - # Fix for upstream issues in rxv.find() with some hardware. - with contextlib.suppress(AttributeError, ValueError): - for recv in rxv.find(DISCOVER_TIMEOUT): - _LOGGER.debug( - "Found Serial %s %s %s", - recv.serial_number, - recv.ctrl_url, - recv.zone, - ) - if recv.ctrl_url == config_info.ctrl_url: - _LOGGER.debug( - "Config Zones Matched Serial %s: %s", - recv.ctrl_url, - recv.serial_number, - ) - zones = rxv.RXV( - config_info.ctrl_url, - friendly_name=config_info.name, - serial_number=recv.serial_number, - model_name=recv.model_name, - ).zone_controllers() - break - - if not zones: - _LOGGER.debug("Config Zones Fallback") - zones = rxv.RXV(config_info.ctrl_url, config_info.name).zone_controllers() + zones = rxv.RXV(config_info.ctrl_url, config_info.name).zone_controllers() _LOGGER.debug("Returned _discover zones: %s", zones) return zones