Keba: Fix type mismatch warning on setState for phaseCount

This commit is contained in:
Simon Stürz 2023-06-19 12:10:00 +02:00
parent 4acddd2219
commit 3734692072

View File

@ -444,12 +444,12 @@ void IntegrationPluginKeba::setupKeba(ThingSetupInfo *info, const QHostAddress &
thing->setStateValue("uptime", report.seconds / 60);
if (thing->thingClassId() == kebaSimpleThingClassId) {
thing->setStateValue(kebaSimplePhaseCountStateTypeId, thing->setting(kebaSimpleThingClassId));
thing->setStateValue(kebaSimplePhaseCountStateTypeId, thing->setting(kebaSimpleThingClassId).toUInt());
}
connect(thing, &Thing::settingChanged, thing, [thing](const ParamTypeId &settingsTypeId, const QVariant &value){
if (settingsTypeId == kebaSimpleSettingsPhaseCountParamTypeId) {
thing->setStateValue(kebaSimplePhaseCountStateTypeId, value);
thing->setStateValue(kebaSimplePhaseCountStateTypeId, value.toUInt());
}
});
});