ocupancy sensor now uses libnl to collect connected devices

fixed regulator saving values as int instead of double
This commit is contained in:
Carl Klemm 2020-02-13 19:22:14 +01:00
parent 772d21a982
commit b0b4a985e9
15 changed files with 93 additions and 44 deletions

View file

@ -65,8 +65,8 @@ void Regulator::store(QJsonObject& json)
void Regulator::load(const QJsonObject& json, bool preserve)
{
Actor::load(json, preserve);
band_ = json["Band"].toInt(1);
setPoint_ = json["SetPoint"].toInt(22);
band_ = json["Band"].toDouble(1);
setPoint_ = json["SetPoint"].toDouble(22);
sensor_.type = json["SensorType"].toInt(0);
sensor_.id = json["SensorId"].toInt(0);
sensor_.field = json["SensorField"].toInt(0);