p->sensor = s;
p->name = strdup(s->name);
- p->graph_enabled = s->graph_enabled;
+ p->graph_enabled = config_is_sensor_graph_enabled(s->id);
p->alarm_enabled = config_get_sensor_alarm_enabled(s->id);
p->color = color_dup(s->color);
p->display_enabled = config_is_sensor_enabled(s->id);
config_set_sensor_name(s->id, s->name);
}
- if (s->graph_enabled != p->graph_enabled) {
- s->graph_enabled = p->graph_enabled;
- config_set_sensor_graph_enabled(s->id, s->graph_enabled);
- }
+ config_set_sensor_graph_enabled(s->id, p->graph_enabled);
if (is_temp_type(s->type) && cfg->temperature_unit == FAHRENHEIT) {
s->alarm_high_threshold