mirror of
https://github.com/home-assistant/core.git
synced 2026-09-05 02:25:07 -05:00
Refactor Shelly logbook name construction (#157026)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user