mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Merge pull request #65606 from home-assistant/rc
This commit is contained in:
commit
f44f1f0c4a
@ -227,7 +227,7 @@ def _async_subscribe_pico_remote_events(
|
|||||||
action = ACTION_RELEASE
|
action = ACTION_RELEASE
|
||||||
|
|
||||||
type_ = device["type"]
|
type_ = device["type"]
|
||||||
name = device["name"]
|
area, name = device["name"].split("_", 1)
|
||||||
button_number = device["button_number"]
|
button_number = device["button_number"]
|
||||||
# The original implementation used LIP instead of LEAP
|
# The original implementation used LIP instead of LEAP
|
||||||
# so we need to convert the button number to maintain compat
|
# so we need to convert the button number to maintain compat
|
||||||
@ -252,7 +252,7 @@ def _async_subscribe_pico_remote_events(
|
|||||||
ATTR_BUTTON_NUMBER: lip_button_number,
|
ATTR_BUTTON_NUMBER: lip_button_number,
|
||||||
ATTR_LEAP_BUTTON_NUMBER: button_number,
|
ATTR_LEAP_BUTTON_NUMBER: button_number,
|
||||||
ATTR_DEVICE_NAME: name,
|
ATTR_DEVICE_NAME: name,
|
||||||
ATTR_AREA_NAME: name.split("_")[0],
|
ATTR_AREA_NAME: area,
|
||||||
ATTR_ACTION: action,
|
ATTR_ACTION: action,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
@ -264,6 +264,7 @@ def get_model_name(info: dict[str, Any]) -> str:
|
|||||||
|
|
||||||
def get_rpc_channel_name(device: RpcDevice, key: str) -> str:
|
def get_rpc_channel_name(device: RpcDevice, key: str) -> str:
|
||||||
"""Get name based on device and channel name."""
|
"""Get name based on device and channel name."""
|
||||||
|
if device.config.get("switch:0"):
|
||||||
key = key.replace("input", "switch")
|
key = key.replace("input", "switch")
|
||||||
device_name = get_rpc_device_name(device)
|
device_name = get_rpc_device_name(device)
|
||||||
entity_name: str | None = device.config[key].get("name", device_name)
|
entity_name: str | None = device.config[key].get("name", device_name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user