Skip to content

Commit

Permalink
Reverse switch operation (#1090)
Browse files Browse the repository at this point in the history
Signed-off-by: WangShao <[email protected]>
  • Loading branch information
Detailzc authored Dec 1, 2023
1 parent af2d335 commit d599a49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ test.register_coroutine_test(
"Handle turnOffIndicatorLight in infochanged : On",
function()
test.socket.device_lifecycle:__queue_receive(mock_parent_device:generate_info_changed({
preferences = { ["stse.turnOffIndicatorLight"] = true }
preferences = { ["stse.turnOffIndicatorLight"] = false }
}))
test.socket.zigbee:__expect_send({ mock_parent_device.id,
cluster_base.write_manufacturer_specific_attribute(mock_parent_device, 0x0006,
Expand All @@ -339,7 +339,7 @@ test.register_coroutine_test(
"Handle turnOffIndicatorLight in infochanged : Off",
function()
test.socket.device_lifecycle:__queue_receive(mock_parent_device:generate_info_changed({
preferences = { ["stse.turnOffIndicatorLight"] = false }
preferences = { ["stse.turnOffIndicatorLight"] = true }
}))
test.socket.zigbee:__expect_send({ mock_parent_device.id,
cluster_base.write_manufacturer_specific_attribute(mock_parent_device, 0x0006,
Expand Down
2 changes: 1 addition & 1 deletion drivers/SmartThings/zigbee-switch/src/wallhero/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ end
local function device_info_changed(driver, device, event, args)
local preferences = device.preferences
local old_preferences = args.old_st_store.preferences
local value_map = { [true] = 0x01,[false] = 0x00 }
local value_map = { [true] = 0x00,[false] = 0x01 }
if preferences ~= nil then
local id = "stse.turnOffIndicatorLight"
local old_value = old_preferences[id]
Expand Down

0 comments on commit d599a49

Please sign in to comment.