Refactor Shelly logbook name construction (#157026)

This commit is contained in:
David Rapan
2025-11-22 18:23:17 +01:00
committed by GitHub
parent 6e5be843d6
commit bd02e279cf
+2 -2
View File
@@ -21,7 +21,7 @@ from .coordinator import (
get_block_coordinator_by_device_id,
get_rpc_coordinator_by_device_id,
)
from .utils import get_rpc_entity_name
from .utils import get_rpc_channel_name
@callback
@@ -43,7 +43,7 @@ def async_describe_events(
rpc_coordinator = get_rpc_coordinator_by_device_id(hass, device_id)
if rpc_coordinator and rpc_coordinator.device.initialized:
key = f"input:{channel - 1}"
input_name = f"{rpc_coordinator.device.name} {get_rpc_entity_name(rpc_coordinator.device, key)}"
input_name = f"{rpc_coordinator.device.name} {get_rpc_channel_name(rpc_coordinator.device, key)}"
elif click_type in BLOCK_INPUTS_EVENTS_TYPES:
block_coordinator = get_block_coordinator_by_device_id(hass, device_id)