ZigbeeLumi: Fix pressure for Lumi sensors

pull/401/head
Michael Zanetti 2021-02-19 16:07:34 +01:00
parent cdff51655f
commit 4b14b94698
1 changed files with 2 additions and 2 deletions

View File

@ -404,11 +404,11 @@ void IntegrationPluginZigbeeLumi::setupThing(ThingSetupInfo *info)
if (pressureCluster) {
// Only set the state if the cluster actually has the attribute
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){
thing->setStateValue(lumiWeatherSensorPressureStateTypeId, pressure * 101);
thing->setStateValue(lumiWeatherSensorPressureStateTypeId, pressure * 10);
});
} else {
qCWarning(dcZigbeeLumi()) << "Could not find the pressure measurement server cluster on" << thing << endpoint;