Merge PR #401: ZigbeeLumi: Fix pressure for Lumi sensors
This commit is contained in:
commit
9ceee2b047
@ -404,11 +404,11 @@ void IntegrationPluginZigbeeLumi::setupThing(ThingSetupInfo *info)
|
|||||||
if (pressureCluster) {
|
if (pressureCluster) {
|
||||||
// Only set the state if the cluster actually has the attribute
|
// Only set the state if the cluster actually has the attribute
|
||||||
if (pressureCluster->hasAttribute(ZigbeeClusterPressureMeasurement::AttributeMeasuredValue)) {
|
if (pressureCluster->hasAttribute(ZigbeeClusterPressureMeasurement::AttributeMeasuredValue)) {
|
||||||
thing->setStateValue(lumiWeatherSensorPressureStateTypeId, pressureCluster->pressure() * 101);
|
thing->setStateValue(lumiWeatherSensorPressureStateTypeId, pressureCluster->pressure() * 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(pressureCluster, &ZigbeeClusterPressureMeasurement::pressureChanged, thing, [thing](double pressure){
|
connect(pressureCluster, &ZigbeeClusterPressureMeasurement::pressureChanged, thing, [thing](double pressure){
|
||||||
thing->setStateValue(lumiWeatherSensorPressureStateTypeId, pressure * 101);
|
thing->setStateValue(lumiWeatherSensorPressureStateTypeId, pressure * 10);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
qCWarning(dcZigbeeLumi()) << "Could not find the pressure measurement server cluster on" << thing << endpoint;
|
qCWarning(dcZigbeeLumi()) << "Could not find the pressure measurement server cluster on" << thing << endpoint;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user