Fix long press event for matter generic switch (#99645)
This commit is contained in:
parent
c77a0a8caa
commit
582eeea082
2 changed files with 3 additions and 3 deletions
|
@ -65,7 +65,7 @@ class MatterEventEntity(MatterEntity, EventEntity):
|
|||
if feature_map & SwitchFeature.kMomentarySwitchRelease:
|
||||
event_types.append("short_release")
|
||||
if feature_map & SwitchFeature.kMomentarySwitchLongPress:
|
||||
event_types.append("long_press_ongoing")
|
||||
event_types.append("long_press")
|
||||
event_types.append("long_release")
|
||||
if feature_map & SwitchFeature.kMomentarySwitchMultiPress:
|
||||
event_types.append("multi_press_ongoing")
|
||||
|
|
|
@ -48,7 +48,7 @@ async def test_generic_switch_node(
|
|||
assert state.attributes[ATTR_EVENT_TYPES] == [
|
||||
"initial_press",
|
||||
"short_release",
|
||||
"long_press_ongoing",
|
||||
"long_press",
|
||||
"long_release",
|
||||
"multi_press_ongoing",
|
||||
"multi_press_complete",
|
||||
|
@ -111,7 +111,7 @@ async def test_generic_switch_multi_node(
|
|||
assert state_button_1.attributes[ATTR_EVENT_TYPES] == [
|
||||
"initial_press",
|
||||
"short_release",
|
||||
"long_press_ongoing",
|
||||
"long_press",
|
||||
"long_release",
|
||||
]
|
||||
# check button 2
|
||||
|
|
Loading…
Add table
Reference in a new issue