-
Notifications
You must be signed in to change notification settings - Fork 499
CHAD-15777: temperatureMeasurement:temperature registering for native… #2267
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,6 +78,9 @@ local function sensor_multilevel_report_handler(self, device, cmd) | |
local scale = 'C' | ||
if (cmd.args.scale == SensorMultilevel.scale.temperature.FAHRENHEIT) then scale = 'F' end | ||
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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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? |
||
end | ||
end | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the same be done for matter-thermostat?