Skip to content

Staged release/aqara unoffical #2258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion drivers/Aqara/aqara-cube/src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ local aqara_cube_t1_pro_handler = {
lifecycle_handlers = {
init = device_init,
added = device_added
}
},
health_check = false,
}

local aqara_cube_t1_pro_driver = ZigbeeDriver("aqara_cube_t1_pro", aqara_cube_t1_pro_handler)
Expand Down
1 change: 1 addition & 0 deletions drivers/Aqara/aqara-feeder/src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ local aqara_pet_feeder_handler = {
infoChanged = device_info_changed,
doConfigure = device_configure
},
health_check = false,
can_handle = function(opts, driver, device, ...)
return device:get_model() == "aqara.feeder.acn001"
end
Expand Down
3 changes: 2 additions & 1 deletion drivers/Aqara/aqara-lock/src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ local aqara_locks_handler = {
},
secret_data_handlers = {
[security.SECRET_KIND_AQARA] = my_secret_data_handler
}
},
health_check = false,
}

local aqara_locks_driver = ZigbeeDriver("aqara_locks_k100", aqara_locks_handler)
Expand Down
1 change: 1 addition & 0 deletions drivers/SmartThings/zigbee-bed/src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ local zigbee_bed_template = {
sub_drivers = {
require("shus-mattress"),
},
health_check = false,
}

defaults.register_for_default_handlers(zigbee_bed_template, zigbee_bed_template.supported_capabilities)
Expand Down
4 changes: 3 additions & 1 deletion drivers/Unofficial/tuya-zigbee/src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ local unofficial_tuya_driver_template = {
require("curtain"),
require("motion-sensor"),
require("smoke-detector"),
require("switch")}
require("switch")
},
health_check = false,
}

defaults.register_for_default_handlers(unofficial_tuya_driver_template, unofficial_tuya_driver_template.supported_capabilities)
Expand Down
80 changes: 39 additions & 41 deletions drivers/Unofficial/tuya-zigbee/src/test/test_meian_button.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ local mock_device_meian_button = test.mock_device.build_test_zigbee_device(

zigbee_test_utils.prepare_zigbee_env_info()
local function test_init()
test.mock_device.add_test_device(mock_device_meian_button)
zigbee_test_utils.init_noop_health_check_timer()
end
test.mock_device.add_test_device(mock_device_meian_button)end

test.set_test_init_function(test_init)

Expand Down Expand Up @@ -79,44 +77,44 @@ test.register_message_test(
}
)

test.register_coroutine_test(
"Health check should check all relevant attributes",
function()
test.socket.device_lifecycle:__queue_receive({ mock_device_meian_button.id, "added"})
test.socket.capability:__expect_send(
mock_device_meian_button:generate_test_message(
"main",
capabilities.button.supportedButtonValues({ "pushed" }, { visibility = { displayed = false } })
)
)
test.socket.capability:__expect_send(
mock_device_meian_button:generate_test_message(
"main",
capabilities.button.numberOfButtons({ value = 1 }, { visibility = { displayed = false } })
)
)
test.socket.capability:__expect_send({
mock_device_meian_button.id,
{
capability_id = "button", component_id = "main",
attribute_id = "button", state = { value = "pushed" }
}
})
test.socket.zigbee:__expect_send({ mock_device_meian_button.id, tuya_utils.build_tuya_magic_spell_message(mock_device_meian_button) })
test.socket.zigbee:__expect_send(
{
mock_device_meian_button.id,
PowerConfiguration.attributes.BatteryPercentageRemaining:read(mock_device_meian_button)
}
)
end,
{
test_init = function()
test.mock_device.add_test_device(mock_device_meian_button)
test.timer.__create_and_queue_test_time_advance_timer(30, "interval", "health_check")
end
}
)
-- test.register_coroutine_test(
-- "Health check should check all relevant attributes",
-- function()
-- test.socket.device_lifecycle:__queue_receive({ mock_device_meian_button.id, "added"})
-- test.socket.capability:__expect_send(
-- mock_device_meian_button:generate_test_message(
-- "main",
-- capabilities.button.supportedButtonValues({ "pushed" }, { visibility = { displayed = false } })
-- )
-- )
-- test.socket.capability:__expect_send(
-- mock_device_meian_button:generate_test_message(
-- "main",
-- capabilities.button.numberOfButtons({ value = 1 }, { visibility = { displayed = false } })
-- )
-- )
-- test.socket.capability:__expect_send({
-- mock_device_meian_button.id,
-- {
-- capability_id = "button", component_id = "main",
-- attribute_id = "button", state = { value = "pushed" }
-- }
-- })
-- test.socket.zigbee:__expect_send({ mock_device_meian_button.id, tuya_utils.build_tuya_magic_spell_message(mock_device_meian_button) })
-- test.socket.zigbee:__expect_send(
-- {
-- mock_device_meian_button.id,
-- PowerConfiguration.attributes.BatteryPercentageRemaining:read(mock_device_meian_button)
-- }
-- )
-- end,
-- {
-- test_init = function()
-- test.mock_device.add_test_device(mock_device_meian_button)
-- test.timer.__create_and_queue_test_time_advance_timer(30, "interval", "health_check")
-- end
-- }
-- )

test.register_coroutine_test(
"Refresh necessary attributes",
Expand Down
4 changes: 1 addition & 3 deletions drivers/Unofficial/tuya-zigbee/src/test/test_tuya_button.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ local mock_device = test.mock_device.build_test_zigbee_device(
zigbee_test_utils.prepare_zigbee_env_info()

local function test_init()
test.mock_device.add_test_device(mock_device)
zigbee_test_utils.init_noop_health_check_timer()
end
test.mock_device.add_test_device(mock_device)end

test.set_test_init_function(test_init)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ local mock_simple_device = test.mock_device.build_test_zigbee_device(
zigbee_test_utils.prepare_zigbee_env_info()

local function test_init()
test.mock_device.add_test_device(mock_simple_device)
zigbee_test_utils.init_noop_health_check_timer()
end
test.mock_device.add_test_device(mock_simple_device)end

test.set_test_init_function(test_init)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ local mock_simple_device = test.mock_device.build_test_zigbee_device(
zigbee_test_utils.prepare_zigbee_env_info()

local function test_init()
test.mock_device.add_test_device(mock_simple_device)
zigbee_test_utils.init_noop_health_check_timer()
end
test.mock_device.add_test_device(mock_simple_device)end

test.set_test_init_function(test_init)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ local mock_simple_device = test.mock_device.build_test_zigbee_device(
zigbee_test_utils.prepare_zigbee_env_info()

local function test_init()
test.mock_device.add_test_device(mock_simple_device)
zigbee_test_utils.init_noop_health_check_timer()
end
test.mock_device.add_test_device(mock_simple_device)end

test.set_test_init_function(test_init)

Expand Down
4 changes: 1 addition & 3 deletions drivers/Unofficial/tuya-zigbee/src/test/test_tuya_switch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ local function test_init()
test.mock_device.add_test_device(second_mock_child_device)
test.mock_device.add_test_device(third_mock_child_device)
test.mock_device.add_test_device(fourth_mock_child_device)
test.mock_device.add_test_device(fifth_mock_child_device)
zigbee_test_utils.init_noop_health_check_timer()
end
test.mock_device.add_test_device(fifth_mock_child_device)end

test.set_test_init_function(test_init)

Expand Down
Loading