Closed pxFIN closed 2 years ago
Taken from Smartthings CLI logcat:
(Aqara Weather)> emitting event {"attribute_id":"atmosphericPressure","capability_id":"atmosphericPressureMeasurement","component_id":"main","state":{"unit":"kPa","value":104}} (Aqara Weather)> emitting event {"attribute_id":"atmosPressure","capability_id":"legendabsolute60149.atmosPressure","component_id":"main","state":{"value":1041}}
So there seems to be two events and in Edge driver:
device:emit_event(capabilities.atmosphericPressureMeasurement.atmosphericPressure({value = utils.round(mBar/10), unit = "kPa"})) device:emit_event(atmos_Pressure.atmosPressure(mBar))
Thus i reckon the last emit in driver is always relevant ?
Future possibility to choose mbar or kPa ? (for example in device settings)
feel free to create a PR,
personally, I don't see any value in the pressure measurement personally, especially in different units.
Taken from Smartthings CLI logcat:
(Aqara Weather)> emitting event {"attribute_id":"atmosphericPressure","capability_id":"atmosphericPressureMeasurement","component_id":"main","state":{"unit":"kPa","value":104}} (Aqara Weather)> emitting event {"attribute_id":"atmosPressure","capability_id":"legendabsolute60149.atmosPressure","component_id":"main","state":{"value":1041}}
So there seems to be two events and in Edge driver:
device:emit_event(capabilities.atmosphericPressureMeasurement.atmosphericPressure({value = utils.round(mBar/10), unit = "kPa"})) device:emit_event(atmos_Pressure.atmosPressure(mBar))
Thus i reckon the last emit in driver is always relevant ?
Future possibility to choose mbar or kPa ? (for example in device settings)