CHAD-15777: temperatureMeasurement:temperature registering for native…#2267
CHAD-15777: temperatureMeasurement:temperature registering for native…#2267aleclorimer wants to merge 1 commit intomainfrom
Conversation
… handlers for zwave and zigbee
|
Channel deleted. |
Test Results 68 files 446 suites 0s ⏱️ For more details on these errors, see this check. Results for commit b737c06. |
|
matter-sensor_coverage.xml
matter-switch_coverage.xml
zigbee-thermostat_coverage.xml
zwave-sensor_coverage.xml
zwave-thermostat_coverage.xml
Minimum allowed coverage is Generated by 🐒 cobertura-action against b737c06 |
| device:emit_event(capabilities.temperatureMeasurement.temperature({value = cmd.args.sensor_value, unit = scale})) | ||
| if type(device.register_native_capability_attr_handler) == "function" then | ||
| device:register_native_capability_attr_handler("temperatureMeasurement","temperature") | ||
| end |
There was a problem hiding this comment.
typically I have avoided doing this in a subdriver even if I tested with it. Was this intended to be done or was it a part of testing?
There was a problem hiding this comment.
I threw this in there because I've seen it done a few times and this was the device that I used to develop the NH for Z-wave. This logic follows the default handler logic, but maybe a better route is to remove this method from the subdriver?
|
The |
| local temp = measured_value / 100.0 | ||
| local unit = "C" | ||
| device:emit_event_for_endpoint(ib.endpoint_id, capabilities.temperatureMeasurement.temperature({value = temp, unit = unit})) | ||
| if type(device.register_native_capability_attr_handler) == "function" then |
There was a problem hiding this comment.
Will the same be done for matter-thermostat?
Checklist
Description of Change
Registering of native handlers for zigbee and z-wave devices for temperatureMeasurement capabilities using the default handlers.
Summary of Completed Tests