@@ -883,32 +883,32 @@ local function match_modular_profile_air_purifer(driver, device)
883
883
local CAPABILITIES_LIST_IDX = 2
884
884
885
885
local humidity_eps = device :get_endpoints (clusters .RelativeHumidityMeasurement .ID )
886
- local temp_eps = embedded_cluster_utils .get_endpoints (device , clusters .temperatureMeasurement .ID )
886
+ local temp_eps = embedded_cluster_utils .get_endpoints (device , clusters .TemperatureMeasurement .ID )
887
887
if # humidity_eps > 0 then
888
888
table.insert (main_component_capabilities , capabilities .relativeHumidityMeasurement .ID )
889
889
end
890
890
if # temp_eps > 0 then
891
- table.insert (main_component_capabilities , capabilities .relativeHumidityMeasurement .ID )
891
+ table.insert (main_component_capabilities , capabilities .temperatureMeasurement .ID )
892
892
end
893
893
894
894
local hepa_filter_eps = embedded_cluster_utils .get_endpoints (device , clusters .HepaFilterMonitoring .ID )
895
895
local ac_filter_eps = embedded_cluster_utils .get_endpoints (device , clusters .ActivatedCarbonFilterMonitoring .ID )
896
896
897
897
if # hepa_filter_eps > 0 then
898
- table.insert (hepa_filter_component_capabilities , capabilities .filterStatus .ID )
899
-
900
898
local filter_state_eps = embedded_cluster_utils .get_endpoints (device , clusters .HepaFilterMonitoring .ID , {feature_bitmap = clusters .HepaFilterMonitoring .types .Feature .CONDITION })
901
899
if # filter_state_eps > 0 then
902
900
table.insert (hepa_filter_component_capabilities , capabilities .filterState .ID )
903
901
end
902
+
903
+ table.insert (hepa_filter_component_capabilities , capabilities .filterStatus .ID )
904
904
end
905
905
if # ac_filter_eps > 0 then
906
- table.insert (ac_filter_component_capabilties , capabilities .filterStatus .ID )
907
-
908
906
local filter_state_eps = embedded_cluster_utils .get_endpoints (device , clusters .ActivatedCarbonFilterMonitoring .ID , {feature_bitmap = clusters .ActivatedCarbonFilterMonitoring .types .Feature .CONDITION })
909
907
if # filter_state_eps > 0 then
910
908
table.insert (ac_filter_component_capabilties , capabilities .filterState .ID )
911
909
end
910
+
911
+ table.insert (ac_filter_component_capabilties , capabilities .filterStatus .ID )
912
912
end
913
913
914
914
-- determine fan capabilities, note that airPurifierFanMode is already mandatory
@@ -927,7 +927,11 @@ local function match_modular_profile_air_purifer(driver, device)
927
927
if # thermostat_eps > 0 then
928
928
-- thermostatMode and temperatureMeasurement should be expected if thermostat is present
929
929
table.insert (main_component_capabilities , capabilities .thermostatMode .ID )
930
- table.insert (main_component_capabilities , capabilities .temperatureMeasurement .ID )
930
+
931
+ -- only add temperatureMeasurement if it is not already added via TemperatureMeasurement cluster support
932
+ if # temp_eps == 0 then
933
+ table.insert (main_component_capabilities , capabilities .temperatureMeasurement .ID )
934
+ end
931
935
local thermostat_capabilities = get_thermostat_optional_capabilities (device )
932
936
for _ , capability_id in pairs (thermostat_capabilities ) do
933
937
table.insert (main_component_capabilities , capability_id )
0 commit comments