Skip to content

Commit

Permalink
fix routine condition error on child button of light switch
Browse files Browse the repository at this point in the history
  • Loading branch information
seojune79 committed Sep 18, 2023
1 parent 05381c5 commit 5129060
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ local function device_added(driver, device)

device:send(cluster_base.write_manufacturer_specific_attribute(device,
PRIVATE_CLUSTER_ID, PRIVATE_ATTRIBUTE_ID, MFG_CODE, data_types.Uint8, 0x01)) -- private
elseif device.network_type == "DEVICE_EDGE_CHILD" then
device:emit_event(capabilities.button.supportedButtonValues({ "pushed" },
{ visibility = { displayed = false } }))
device:emit_event(capabilities.button.numberOfButtons({ value = 1 },
{ visibility = { displayed = false } }))
device:emit_event(capabilities.button.button.pushed({ state_change = false }))
end
end

Expand Down

0 comments on commit 5129060

Please sign in to comment.