Fix lutron_caseta button events including area name in device name (#65601)
parent
189f1f8c25
commit
727743c4cd
|
@ -227,7 +227,7 @@ def _async_subscribe_pico_remote_events(
|
|||
action = ACTION_RELEASE
|
||||
|
||||
type_ = device["type"]
|
||||
name = device["name"]
|
||||
area, name = device["name"].split("_", 1)
|
||||
button_number = device["button_number"]
|
||||
# The original implementation used LIP instead of LEAP
|
||||
# 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_LEAP_BUTTON_NUMBER: button_number,
|
||||
ATTR_DEVICE_NAME: name,
|
||||
ATTR_AREA_NAME: name.split("_")[0],
|
||||
ATTR_AREA_NAME: area,
|
||||
ATTR_ACTION: action,
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue