1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-02 00:20:30 +01:00

Address comments

This commit is contained in:
Paulus Schoutsen
2026-03-31 22:06:35 -04:00
parent 2562894265
commit e4575f39a5
2 changed files with 3 additions and 2 deletions

View File

@@ -29,6 +29,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: DenonRS232ConfigEntry) -
await receiver.query_state()
except (ConnectionError, OSError) as err:
LOGGER.error("Error connecting to Denon receiver at %s: %s", port, err)
if receiver.connected:
await receiver.disconnect()
raise ConfigEntryNotReady from err
entry.runtime_data = receiver

View File

@@ -2,7 +2,6 @@
from __future__ import annotations
import os
from typing import Any
from denon_rs232 import DenonReceiver
@@ -131,7 +130,7 @@ def get_ports() -> dict[str, str]:
"""Get available serial ports keyed by their device path."""
return {
port.device: human_readable_device_name(
os.path.realpath(port.device),
port.device,
port.serial_number,
port.manufacturer,
port.description,