Skip to content

Commit

Permalink
adapt settings
Browse files Browse the repository at this point in the history
  • Loading branch information
markirb committed Oct 14, 2024
1 parent 8177f5f commit 171a6ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/shelly_hap_humidity_sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ Status HumiditySensor::SetConfig(const std::string &config_json,
}
if (cfg_->update_interval != cfg.update_interval) {
cfg_->update_interval = cfg.update_interval;
hum_sensor_->StartUpdating(cfg_->update_interval * 1000);
// update interval is set via temperature sensor
// hum_sensor_->StartUpdating(cfg_->update_interval * 1000);
}
return Status::OK();
}
Expand Down
3 changes: 3 additions & 0 deletions src/shelly_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,11 @@ void CreateHAPSensors(std::vector<std::unique_ptr<TempSensor>> *sensors,

if (ts->getType() == TS_HUM) { // can only be one shares config, as same
// update interval but no unit settable
i++;
ts_cfg = ts_cfgs[i];
shelly::hap::CreateHAPHumiditySensor(j++, (HumidityTempSensor *) ts,
ts_cfg, comps, accs, svr);
break; // max 1 DHT sensor
}
}
}
Expand Down

0 comments on commit 171a6ef

Please sign in to comment.