@@ -63,7 +63,7 @@ function utils.mired_to_kelvin(value, minOrMax)
6363 end
6464end
6565
66- function utils .check_vendor_overrides (device , override_key )
66+ function utils .get_product_override_field (device , override_key )
6767 if fields .vendor_overrides [device .manufacturer_info .vendor_id ]
6868 and fields .vendor_overrides [device .manufacturer_info .vendor_id ][device .manufacturer_info .product_id ]
6969 then
8686--- whether the device type for an endpoint is currently supported by a profile for
8787--- combination button/switch devices.
8888function utils .device_type_supports_button_switch_combination (device , endpoint_id )
89- if utils .check_vendor_overrides (device , " ignore_combo_switch_button" ) then
89+ if utils .get_product_override_field (device , " ignore_combo_switch_button" ) then
9090 return false
9191 end
92- local dimmable_eps = utils .get_endpoints_by_dt (device , fields .DIMMABLE_LIGHT_DEVICE_TYPE_ID )
92+ local dimmable_eps = utils .get_endpoints_by_device_type (device , fields .DIMMABLE_LIGHT_DEVICE_TYPE_ID )
9393 return utils .tbl_contains (dimmable_eps , endpoint_id )
9494end
9595
9696--- find_default_endpoint is a helper function to handle situations where
9797--- device does not have endpoint ids in sequential order from 1
9898function utils .find_default_endpoint (device )
9999 -- Buttons should not be set on the main component for the Aqara Climate Sensor W100,
100- if utils .check_vendor_overrides (device , " is_climate_sensor_w100" ) then
100+ if utils .get_product_override_field (device , " is_climate_sensor_w100" ) then
101101 return device .MATTER_DEFAULT_ENDPOINT
102102 end
103103
@@ -169,7 +169,7 @@ function utils.matter_handler(driver, device, response_block)
169169end
170170
171171-- get a list of endpoints for a specified device type.
172- function utils .get_endpoints_by_dt (device , device_type_id )
172+ function utils .get_endpoints_by_device_type (device , device_type_id )
173173 local dt_eps = {}
174174 for _ , ep in ipairs (device .endpoints ) do
175175 for _ , dt in ipairs (ep .device_types ) do
@@ -193,7 +193,7 @@ function utils.create_multi_press_values_list(size, supportsHeld)
193193end
194194
195195function utils .detect_bridge (device )
196- return # utils .get_endpoints_by_dt (device , fields .AGGREGATOR_DEVICE_TYPE_ID ) > 0
196+ return # utils .get_endpoints_by_device_type (device , fields .AGGREGATOR_DEVICE_TYPE_ID ) > 0
197197end
198198
199199function utils .detect_matter_thing (device )
0 commit comments